Updated svn version scripts for git

This commit is contained in:
o9000
2015-04-24 18:45:25 +02:00
parent 3467a44761
commit 2357e31965
4 changed files with 37 additions and 44 deletions

View File

@@ -1,23 +1,40 @@
#!/bin/bash
# usage: ./make_release.sh RELEASE_VERSION_NUMBER
# Usage: ./make_release.sh
# Creates a tar.bz2 archive of the current tree.
#
# To bump the version number for the current commit (make sure you are in HEAD!), run manually:
#
# git tag -a v0.12 -m 'Version 0.12'
#
# To generate a release for an older tagged commit, first list the tags with:
#
# git tags
#
# then checkout the tagged commit with:
#
# git checkout tags/v0.1
#
# Finally, to revert to HEAD:
#
# git checkout master
if [[ $# -ne 1 ]]; then
echo "usage: $0 RELEASE_VERSION_NUMBER"
exit
fi
VERSION=$(./get_version.sh)
DIR=tint2-${1}
echo "Making release ${DIR}"
rm -Rf ${DIR}
svn export . ${DIR} > /dev/null
DIR=tint2-$VERSION
echo "Making release $DIR"
rm -rf $DIR
# delete unneeded files
rm -f ${DIR}/configure ${DIR}/make_release.sh
git checkout-index --prefix=$DIR/ -a
# replace get_svnrev.sh by a simple echo command
echo "echo \"#define VERSION_STRING \\\"${1}\\\"\" > version.h" > ${DIR}/get_svnrev.sh
# Delete unneeded files
rm -f $DIR/make_release.sh
# create tarball and remove the exported directory
tar -cjf ${DIR}.tar.bz2 ${DIR}
rm -Rf ${DIR}
echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_version.sh
# Create tarball and remove the exported directory
tar -cjf $DIR.tar.bz2 $DIR
rm -rf $DIR
sha1sum -b $DIR.tar.bz2
sha256sum -b $DIR.tar.bz2