diff --git a/push_tag.sh b/push_tag.sh new file mode 100644 index 000000000..35ea25d72 --- /dev/null +++ b/push_tag.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +git fetch --all + +LAST_TAG=$(git log --tags -1 --pretty='%h') +COMMITS=$(git log $LAST_TAG..origin/master) +TAG=$(date '+%Y.%m.%d') + +if [ -n "$COMMITS" ]; then + git tag $TAG origin/master + git push origin $TAG +fi +