Update taggit
This commit is contained in:
14
taggit
14
taggit
@@ -8,22 +8,26 @@ if [ "$MAKETAG" == "false" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f version ]; then
|
if [ ! -f version ]; then
|
||||||
${dirname $BASH_SOURCE)/genversion > version
|
$(dirname $BASH_SOURCE)/genversion > version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ~/.buildtoolsrc
|
. ~/.buildtoolsrc
|
||||||
git pull
|
. version
|
||||||
|
|
||||||
|
WHOLETAG="${VERSIONERS_TAGBASE}${SEP}${MAJOR}${SEP}${BUILD}"
|
||||||
|
|
||||||
|
git fetch --tags
|
||||||
|
|
||||||
TAGSHA1=$(git rev-list $TAG | head -n 1)
|
TAGSHA1=$(git rev-list $TAG | head -n 1)
|
||||||
if [ $REBUILDING -eq 0 ]; then
|
if [ $REBUILDING -eq 0 ]; then
|
||||||
echo "This is a rebuild of a previous tag, not tagging or pushing" >&2
|
echo "This is a rebuild of a previous tag, not tagging or pushing" >&2
|
||||||
elif [ "$TAGSHA1" != "" ] && [ "$TAGSHA1" != "$SHA1" ]; then
|
elif [ "$(git tag | grep $WHOLETAG)" != "" ] && [ "$TAGSHA1" != "" ] && [ "$TAGSHA1" != "$SHA1" ]; then
|
||||||
echo "Someone else tagged my buildnumber (branch|${MAJOR}|${BUILD}) onto $TAGSHA1, while I built it from $SHA1 ... "'Help!' >&2
|
echo "Someone else tagged my buildnumber (${WHOLETAG}) onto $TAGSHA1, while I built it from $SHA1 ... "'Help!' >&2
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$TAGSHA1" != "" ] && [ "$TAGSHA1" == "$SHA1" ]; then
|
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."
|
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
|
else
|
||||||
git tag -f -a "${VERSIONERS_TAGBASE}${SEP}${MAJOR}${SEP}${BUILD}" $SHA1
|
git tag -f -a "${WHOLETAG}" -m "Tagging for ${MAJOR}-${BUILD}" $SHA1
|
||||||
if [ "$PUSHTAG" != "false" ]; then
|
if [ "$PUSHTAG" != "false" ]; then
|
||||||
git push --tags
|
git push --tags
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user