From e966b4a4972af39ffec345e5ebe362b7565fc4b5 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 13 Jan 2010 16:45:39 +0000 Subject: tools/export.sh: Add version bump to export script Signed-off-by: Sol Jerome git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5677 ce84e21b-d406-0410-9b95-82705330c041 --- tools/export.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/export.sh b/tools/export.sh index 48eb93112..67db7dd80 100755 --- a/tools/export.sh +++ b/tools/export.sh @@ -7,10 +7,39 @@ expath="/tmp/${name}-${version}/" tarname="/tmp/${name}-${version}.tar.gz" url=`svn info | grep URL | awk '{print $2}'` -if [ -z "$version" ] ; then +if [ -z "${version}" ] ; then echo "must supply version number" exit 1 fi + +# update the version +deblogtmp=`mktemp` +majorver=`/usr/bin/python -c "print '${version}'[:5]"` +minorver=`/usr/bin/python -c "print '${version}'[5:]"` +printf "name: " +read name +printf "email: " +read email +cat > deblogtmp << EOF +bcfg2 (${majorver}-0.0${minorver}) unstable; urgency=low + + * New upstream release + + -- ${name} <${email}> `/bin/date -R` + +EOF +sed -i "s/^\(Version:\) [:digits:]*.*$/\1 ${version}/" misc/bcfg2.spec +sed -i "s|^\(Source0:\).*$|\1 ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-${version}.tar.gz|" misc/bcfg2.spec +sed -i "s/^\(%setup -q -n\).*/\1 bcfg2-${version}/" misc/bcfg2.spec +cat debian/changelog >> deblogtmp +mv deblogtmp debian/changelog +echo ${majorver} > redhat/VERSION +echo 0.0${minorver} > redhat/RELEASE +sed -i "s/\(version=\).*/\1\"${version}\",/" setup.py +sed -i "s/^\(VERS\).*/\1=${version}-1/" solaris/Makefile +svn ci -m "Version bump to ${version}" + +# tag the release tagstr=`echo ${version} | sed -e 's/\./_/g'` svn copy "$url" "${repo}/tags/${name}_${tagstr}" -m "tagged ${version} release" svn export . "${expath}" @@ -20,4 +49,3 @@ cd /tmp tar czf "${tarname}" "${name}-${version}" gpg --armor --output "${tarname}".gpg --detach-sig "${tarname}" scp "${tarname}"* terra.mcs.anl.gov:/mcs/ftp/pub/bcfg - -- cgit v1.2.3-1-g7c22