diff options
-rwxr-xr-x | dist/release-vespa-rpm.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dist/release-vespa-rpm.sh b/dist/release-vespa-rpm.sh index db00295bb25..d5f969b34dc 100755 --- a/dist/release-vespa-rpm.sh +++ b/dist/release-vespa-rpm.sh @@ -2,12 +2,13 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. set -e -if [ $# -ne 1 ]; then - echo "Usage: $0 <version>" +if [ $# -ne 2 ]; then + echo "Usage: $0 <version> <git ref>" exit 1 fi readonly VERSION=$1 +readonly GITREF=$2 readonly SPECFILE="dist/vespa.spec" readonly RPM_BRANCH="rpmbuild" readonly CURRENT_BRANCH=$(git branch | grep "^\*" | cut -d' ' -f2) @@ -17,9 +18,9 @@ git checkout master git pull --rebase # Delete existing branch if exists and create new one -git push origin :$RPM_BRANCH &> /dev/null || true +git push --delete origin &> /dev/null || true git branch -D $RPM_BRANCH &> /dev/null || true -git checkout -b $RPM_BRANCH $VERSION +git checkout -b $RPM_BRANCH $GITREF # Tito expects spec file to be on root git mv $SPECFILE . |