2008-01-09 20:17:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ ! -d src ] ; then
|
|
|
|
echo "Please run me in bip sources root." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
release="$1"
|
|
|
|
|
|
|
|
if [ -n "$release" ]
|
|
|
|
then
|
2008-01-09 23:31:22 +01:00
|
|
|
git log > ChangeLog
|
2008-01-09 20:17:38 +01:00
|
|
|
echo '#define BIP_VERSION "'$release'"' > src/version.h
|
2008-01-09 23:31:22 +01:00
|
|
|
git commit -a -m "Update src/version.h and Changelog for release."
|
2008-01-09 20:17:38 +01:00
|
|
|
git tag release-$release
|
|
|
|
prefix=bip-$release
|
|
|
|
else
|
|
|
|
prefix=bip-$(date +%y%m%d)
|
|
|
|
fi
|
|
|
|
|
|
|
|
olddir=$(pwd)
|
2009-06-05 00:44:28 +02:00
|
|
|
tmpdir=$(mktemp -d /var/tmp/bip-XXXXXX)
|
2009-02-28 11:19:57 +01:00
|
|
|
git archive --format=tar --prefix=$prefix/ HEAD > $tmpdir/$prefix.tar
|
2008-01-09 20:17:38 +01:00
|
|
|
cd $tmpdir
|
|
|
|
tar xf $prefix.tar
|
|
|
|
cd $prefix
|
|
|
|
./bootstrap
|
2008-02-16 11:33:00 +01:00
|
|
|
rm -rf autom4te.cache
|
2008-01-09 20:17:38 +01:00
|
|
|
cd ..
|
|
|
|
tar czf $olddir/../$prefix.tar.gz $prefix
|
|
|
|
cd $olddir
|
|
|
|
rm -rf $tmpdir
|
|
|
|
echo "See ../$prefix.tar.gz"
|
|
|
|
|
|
|
|
if [ -n "$release" ]
|
|
|
|
then
|
|
|
|
echo '#define BIP_VERSION "'$release'-git"' > src/version.h
|
|
|
|
git commit -a -m "Add -git to version string."
|
|
|
|
fi
|
2008-01-09 20:18:27 +01:00
|
|
|
|