Adding scripts

This commit is contained in:
2013-05-16 21:39:50 -04:00
parent f3e49c2c03
commit 22c70e8f5f
5 changed files with 294 additions and 0 deletions

27
taggit Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
if [ "$MAKETAG" == "false" ]; then
exit 0
fi
if [ ! -f version ]; then
${dirname $BASH_SOURCE)/genversion > version
fi
. ~/.buildtoolsrc
git pull
TAGSHA1=$(git rev-list $TAG | head -n 1)
if [ $REBUILDING -eq 0 ]; then
echo "This is a rebuild of a previous tag, not tagging or pushing" >&2
elif [ "$TAGSHA1" != "" ] && [ "$TAGSHA1" != "$SHA1" ]; then
echo "Someone else tagged my buildnumber (branch|${MAJOR}|${BUILD}) onto $TAGSHA1, while I built it from $SHA1 ... "'Help!' >&2
exit 1
elif [ "$TAGSHA1" != "" ] && [ "$TAGSHA1" == "$SHA1" ]; then
echo "Someone else built this version at the same time I did, and we both tagged the same SHA1 with the same build tag. Not pushing my tag."
else
git tag -f -a "build,${MAJOR},${BUILD}" $SHA1
if [ "$PUSHTAG" != "false" ]; then
git push
fi
fi