You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by gs...@apache.org on 2002/08/28 02:52:37 UTC
cvs commit: apr-dist/tools release.sh
gstein 2002/08/27 17:52:37
Added: tools release.sh
Log:
First whack at a release script.
Revision Changes Path
1.1 apr-dist/tools/release.sh
Index: release.sh
===================================================================
#!/bin/sh
#
# release.sh : build a release tarball
#
# USAGE: release.sh VERSION
#
# The version number is specified as MAJOR.MINOR.PATCH (and will be used
# in the output tarball name). The script will then look for a CVS tag
# named "APR_{MAJOR}_{MINOR}_{PATCH}" and export it into a subdirectory
# (of the current directory). Next, it will run the appropriate commands
# to prepare and construct the tarball. The subdirectory will be cleaned
# up upon exit.
#
if test "$#" != 1 && test "$#" != 2; then
echo "USAGE: $0 VERSION [SIGNING-USER]"
echo " see the comments in this script for more info."
exit 1
fi
vsn="$1"
major="`echo $1 | sed 's/\..*$//'`"
minor="`echo $1 | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
patch="`echo $1 | sed 's/^.*\.//'`"
tagname="APR_${major}_${minor}_${patch}"
dirname="apr-$vsn"
echo " Version: $vsn"
echo " Tag name: $tagname"
echo "Directory: $dirname"
if test -d ${dirname}; then
echo "ERROR: for safety, you must manually remove $dirname."
exit 1
fi
split="---------------------------------------------------------------------"
# make sure that the perms are good for the tarball
umask 022
echo $split
echo ""
echo "Starting CVS export of APR to $dirname ..."
echo ""
cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic export -r ${tagname} -d ${dirname} apr > /dev/null || exit 1
echo $split
echo ""
echo "Eliminating unwanted files (e.g. .cvsignore) and generating initial"
echo "files via buildconf ..."
echo ""
find $dirname -name .cvsignore | xargs rm -f
find $dirname -name autom4te.cache | xargs rm -rf
rm -f $dirnme/STATUS
(cd ${dirname} && ./buildconf) || exit 1
echo $split
echo ""
echo "Building the tarball, .gz, and .Z files ..."
echo ""
tar cf ${dirname}.tar ${dirname}
gzip -9 --to-stdout ${dirname}.tar > ${dirname}.tar.gz
compress ${dirname}.tar
echo $split
echo ""
echo "Cleaning up and signing the files ..."
echo ""
rm -rf ${dirname}
if which pgp > /dev/null 2>&1; then
if test -n "$2"; then
user="-u $2"
fi
pgp -sba ${dirname}.tar.gz ${user}
pgp -sba ${dirname}.tar.Z ${user}
### md5 summaries?
else
if test -n "$2"; then
user="--default-key $2"
fi
gpg --armor ${user} --detach-sign ${dirname}.tar.gz
gpg --armor ${user} --detach-sign ${dirname}.tar.Z
gpg --print-md md5 ${dirname}.tar.gz > ${dirname}.tar.gz.md5
gpg --print-md md5 ${dirname}.tar.Z > ${dirname}.tar.Z.md5
fi
Re: cvs commit: apr-dist/tools release.sh
Posted by Greg Stein <gs...@lyra.org>.
This is an initial whack at a release script. It seems to do the job, and
produce the right bits. I gotta run right now, but will test it further
tonite, then start the release process (mostly, more docs to put into the
apr-dist module).
If people would like to give this a run, then you can test it against the
APR_0_9_0 tag (which I just made!).
$ mkdir work ; cd work
$ ~/src/apr-dist/tools/release.sh 0.9.0
[spew]
$ ls
apr-0.9.0.tar.Z apr-0.9.0.tar.Z.md5 apr-0.9.0.tar.gz.asc
apr-0.9.0.tar.Z.asc apr-0.9.0.tar.gz apr-0.9.0.tar.gz.md5
$
Cheers,
-g
On Wed, Aug 28, 2002 at 12:52:37AM -0000, gstein@apache.org wrote:
> gstein 2002/08/27 17:52:37
>
> Added: tools release.sh
> Log:
> First whack at a release script.
>
> Revision Changes Path
> 1.1 apr-dist/tools/release.sh
>
> Index: release.sh
>...
--
Greg Stein, http://www.lyra.org/