nvie / gitflow

Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
http://nvie.com/posts/a-successful-git-branching-model/
Other
26.6k stars 2.66k forks source link

Release finish push order #6415

Open davidgoate opened 6 years ago

davidgoate commented 6 years ago

Hi, firstly, thanks for such an awesome tool.

I've been using this as part of my release automation. However I have one issue.

https://github.com/nvie/gitflow/blob/develop/git-flow-release#L292 shows that when doing a git flow release finish -p the order of pushes is:

1) develop 2) master 3) the tag

My question is, is there a specific reason the tag would need to be pushed after master or develop? Specifically in my workflow this can be a problem because my CI master build performs continuous deployment using the tag. Jenkins is automatically triggered on the master branch push and part of my build uses the git commit to discover the tags, e.g. git describe ${commitHash}" which works fine after the tag is pushed:

git describe 200cef390cf71ea8ba90cf933c56994ccf1efd2f
Found tag v1.0.4
 matching commit hash 200cef390cf71ea8ba90cf933c56994ccf1efd2f.

however, if the build kicks in quickly enough when master is pushed the tag can't be found yet. Could tags be pushed before master or is there an important reason why not?