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