Use common functions in rc*.sh
DRY: Use common shell functions rather than the local copy. Change-Id: I8358f85fa7e17a25f716befc2630894ddd10ec4b
This commit is contained in:
parent
f35db890b9
commit
13b8dc194c
20
rccut.sh
20
rccut.sh
|
@ -45,26 +45,18 @@ fi
|
|||
RC1MILESTONE="$SERIES-rc1"
|
||||
|
||||
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
function title {
|
||||
echo
|
||||
echo "$(tput bold)$(tput setaf 1)[ $1 ]$(tput sgr0)"
|
||||
}
|
||||
source $TOOLSDIR/functions
|
||||
|
||||
title "Checking that $RC1MILESTONE exists"
|
||||
$TOOLSDIR/ms2version.py --onlycheck $LPROJECT $RC1MILESTONE
|
||||
|
||||
title "Cloning repository for $PROJECT"
|
||||
MYTMPDIR=`mktemp -d`
|
||||
cd $MYTMPDIR
|
||||
git clone git://git.openstack.org/openstack/$PROJECT
|
||||
cd $PROJECT
|
||||
LANG=C git review -s
|
||||
setup_temp_space rc-branch-$PROJECT
|
||||
clone_repo openstack/$PROJECT
|
||||
cd openstack/$PROJECT
|
||||
|
||||
if $(git branch -r | grep stable/$SERIES > /dev/null); then
|
||||
echo "The stable/$SERIES branch already exists !"
|
||||
cd ../..
|
||||
rm -rf $MYTMPDIR
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -73,10 +65,6 @@ git branch stable/$SERIES $SHA
|
|||
REALSHA=`git show-ref -s stable/$SERIES`
|
||||
git push gerrit stable/$SERIES
|
||||
|
||||
title "Cleaning up repository"
|
||||
cd ../..
|
||||
rm -rf $MYTMPDIR
|
||||
|
||||
# No longer check tarballs since they can lag hours now
|
||||
#if [[ "$SKIPTARBALL" != "1" ]]; then
|
||||
# title "Waiting for tarball from $REALSHA"
|
||||
|
|
|
@ -44,11 +44,7 @@ if [[ "$PROJECT" == neutron-* ]]; then
|
|||
fi
|
||||
|
||||
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
function title {
|
||||
echo
|
||||
echo "$(tput bold)$(tput setaf 1)[ $1 ]$(tput sgr0)"
|
||||
}
|
||||
source $TOOLSDIR/functions
|
||||
|
||||
title "Resolving $LPROJECT $SERIES $RC to version"
|
||||
|
||||
|
@ -67,11 +63,9 @@ echo "$SERIES $RC (milestone $MILESTONE) is version $VERSION"
|
|||
echo "Final $SERIES version will be $FINALVERSION"
|
||||
|
||||
title "Cloning repository for $PROJECT"
|
||||
MYTMPDIR=`mktemp -d`
|
||||
cd $MYTMPDIR
|
||||
git clone git://git.openstack.org/openstack/$PROJECT -b stable/$SERIES
|
||||
cd $PROJECT
|
||||
LANG=C git review -s
|
||||
setup_temp_space rc-delivery-$PROJECT
|
||||
clone_repo openstack/$PROJECT stable/$SERIES
|
||||
cd openstack/$PROJECT
|
||||
|
||||
if [[ "$RC" == "final" ]]; then
|
||||
TAGMSG="${PROJECT^} $VERSION"
|
||||
|
@ -107,7 +101,3 @@ else
|
|||
--deliverable=$PROJECT --milestone=$MILESTONE --nop
|
||||
fi
|
||||
fi
|
||||
|
||||
title "Cleaning up"
|
||||
cd ../..
|
||||
rm -rf $MYTMPDIR
|
||||
|
|
Loading…
Reference in New Issue