diff --git a/tools/semver_git_tag b/tools/semver_git_tag index 98e7612..d5016b6 100755 --- a/tools/semver_git_tag +++ b/tools/semver_git_tag @@ -37,6 +37,15 @@ if [[ $? -ne 0 ]]; then exit -1 fi +# check if push needed before tagging +push_needed=`git rev-list --branches --not --remotes |wc -l` +if [[ $push_needed -ne 0 ]]; then + echo 'git push needed' + git push + echo 'git push done' + echo '-------------' +fi + # check latest tagged version LAST_TAG=`git rev-list --tags --max-count=1 2>/dev/null` if [[ $? -eq 0 ]]; then