Add tag annotation and tag signing to both release and hotfix.
Require branch and tag to be absent when start is run (for release/hotfix)
Require branch to exist when trying to finish (for release/hotfix)
Die the finish script when either the fetch, checkout or tagging fails.
diff --git a/gitflow-common b/gitflow-common
index 2fbd8ec..c96b845 100644
--- a/gitflow-common
+++ b/gitflow-common
@@ -42,6 +42,7 @@
LOCAL_BRANCHES=$(git branch | sed 's/^[* ] //')
REMOTE_BRANCHES=$(git branch -r | sed 's/^[* ] //')
ALL_BRANCHES="$LOCAL_BRANCHES $REMOTE_BRANCHES"
+ALL_TAGS=$(git tag)
#
# resolve_nameprefix
@@ -141,6 +142,12 @@
fi
}
+gitflow_require_tag_absent() {
+ if has $1 $ALL_TAGS; then
+ die "Tag '$1' already exists. Pick another name."
+ fi
+}
+
#
# gitflow_test_branches_equal()
#