From 072fcd1447aa5d71aecb40000506404acacbdb41 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 1 Jul 2012 15:12:24 -0400 Subject: [PATCH] Cleaned up some warnings found in testing. None of this does anything functionally different - but it does remove a slight bit of needless complexity. Change-Id: Ibd19e3dc861dc9ac5a6451d8c65129eb6abff744 --- .../files/slave_scripts/create-tarball.sh | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/modules/jenkins_slave/files/slave_scripts/create-tarball.sh b/modules/jenkins_slave/files/slave_scripts/create-tarball.sh index 7e33a9d61d..bd1f1a9aa0 100755 --- a/modules/jenkins_slave/files/slave_scripts/create-tarball.sh +++ b/modules/jenkins_slave/files/slave_scripts/create-tarball.sh @@ -9,14 +9,6 @@ if [ $BRANCH == "milestone-proposed" ] then REVNOPREFIX="r" fi -if [[ $BRANCH =~ ^stable/.*$ ]] -then - NOMILESTONE="true" -fi - -# Should be ~ if tarball version is the one we're working *toward*. (By far preferred!) -# Should be + if tarball version is already released and we're moving forward after it. -SEPARATOR=${SEPARATOR:-'~'} if [ -z "$1" ] then @@ -28,13 +20,13 @@ PROJECT=$1 find_next_version() { datestamp="${datestamp:-$(date +%Y%m%d)}" git fetch origin +refs/meta/*:refs/remotes/meta/* - milestonever="$(git show meta/openstack/release:${BRANCH})" - if [ $? != 0 ] + if [[ $BRANCH =~ ^stable/.*$ ]] then - if [ "$NOMILESTONE" = "true" ] + milestonever="" + else + milestonever="$(git show meta/openstack/release:${BRANCH})" + if [ $? != 0 ] then - milestonever="" - else echo "Milestone file ${BRANCH} not found. Bailing out." >&2 exit 1 fi @@ -60,9 +52,9 @@ if [ -f setup.py ] ; then snapshotversion=`tar --wildcards -O -z -xf $tarball *versioninfo 2>/dev/null || true` if [ "x${snapshotversion}" = "x" ] ; then snapshotversion=$(find_next_version) - echo mv "$tarball" "dist/$(basename $tarball .tar.gz)${SEPARATOR}${snapshotversion}.tar.gz" - mv "$tarball" "dist/$(basename $tarball .tar.gz)${SEPARATOR}${snapshotversion}.tar.gz" - cp "dist/$(basename $tarball .tar.gz)${SEPARATOR}${snapshotversion}.tar.gz" "dist/${PROJECT}-${BRANCH_PATH}.tar.gz" + echo mv "$tarball" "dist/$(basename $tarball .tar.gz)~${snapshotversion}.tar.gz" + mv "$tarball" "dist/$(basename $tarball .tar.gz)~${snapshotversion}.tar.gz" + cp "dist/$(basename $tarball .tar.gz)~${snapshotversion}.tar.gz" "dist/${PROJECT}-${BRANCH_PATH}.tar.gz" elif [ "$tarball" != "dist/${PROJECT}-${snapshotversion}.tar.gz" ] ; then echo mv "$tarball" "dist/${PROJECT}-${snapshotversion}.tar.gz" mv "$tarball" "dist/${PROJECT}-${snapshotversion}.tar.gz"