Improve release script.

This commit is contained in:
Daniel Kraus
2013-08-28 20:27:29 +02:00
parent a6d7184fc6
commit ed13ec9d96

View File

@ -1,7 +1,24 @@
#!/bin/sh #!/bin/bash
# This script packs the relevant files of the LinkTitles # This script packs the relevant files of the LinkTitles
# extension into two archive files that contain the current # extension into two archive files that contain the current
# git tag as the version number. # git tag as the version number.
tar cvzf release/LinkTitles-`git describe --tags --abbrev=0`.tar.gz gpl-*.txt NEWS LinkTitles.* --exclude '*~' --transform 's,^,LinkTitles/,' if [[ -z $1 ]]; then
echo "Usage: $(basename $0) VERSION."
echo "Missing VERSION!"
exit 1
fi
FILENAME="release/LinkTitles-$1.tar.gz"
# Pack the relevant files into at tarball, renaming the paths to include the
# root path "LinktTitles".
tar cvzf $FILENAME gpl-*.txt NEWS LinkTitles.* --exclude '*~' --transform 's,^,LinkTitles/,'
# Add the tarball to the repository, commit it, then tag the commit and push to origin.
git add $FILENAME
git commit -m "Release version $1"
git tag -a $1 -m "Version $1."
git push
git push --tags