diff options
-rwxr-xr-x | tools/export.sh | 32 |
1 files changed, 30 insertions, 2 deletions
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 - |