From eac50d29ec62337798c9da91feef0a8e725ebe90 Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Wed, 13 Feb 2019 11:41:32 +0000 Subject: 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. --- dist.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dist.sh') diff --git a/dist.sh b/dist.sh index ae4cce08a99..aee7a20c8fe 100755 --- a/dist.sh +++ b/dist.sh @@ -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 -- cgit v1.2.3