diff options
author | Arnstein Ressem <aressem@oath.com> | 2019-02-13 11:41:32 +0000 |
---|---|---|
committer | Arnstein Ressem <aressem@oath.com> | 2019-02-13 11:41:32 +0000 |
commit | eac50d29ec62337798c9da91feef0a8e725ebe90 (patch) | |
tree | 18b2567142d8ba61820fcf44670a574e2f3191e5 /dist.sh | |
parent | b9869d95dd4d80e23f15d610756924aaa12ea28b (diff) |
Pick up vespa.spec from source root when building from tags. Copr requires spec file to be at the source root to properly build. This solution allows to build from both HEAD and tag.
Diffstat (limited to 'dist.sh')
-rwxr-xr-x | dist.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -10,4 +10,11 @@ VERSION="$1" mkdir -p ~/rpmbuild/{SOURCES,SPECS} GZIP=-1 tar -zcf ~/rpmbuild/SOURCES/vespa-$VERSION.tar.gz --exclude target --exclude cmake-build-debug --transform "flags=r;s,^,vespa-$VERSION/," * -sed -e "s,_VESPA_VERSION_,$VERSION," < dist/vespa.spec > ~/rpmbuild/SPECS/vespa-$VERSION.spec + +DIST_FILE="dist/vespa.spec" +# When checking out relase tags, the vespa.spec is in the source root folder. This is a workaround to be able to build rpms from a release tag. +if [ ! -e "$DIST_FILE" ]; then + DIST_FILE="vespa.spec" +fi + +sed -e "s,_VESPA_VERSION_,$VERSION," < "$DIST_FILE" > ~/rpmbuild/SPECS/vespa-$VERSION.spec |