docker-make icon indicating copy to clipboard operation
docker-make copied to clipboard

Please update the docs with elaboration for `on_tag` and `on_branch`

Open prometheas opened this issue 7 years ago • 2 comments

Can you please elaborate what those configs do? Does docker-make somehow keep track of which tags it has already published, and only run on_tag when it "sees a new tag" in the repository? If so, how does the tool track which tags it has seen, and which it has not yet seen?

Similar question for on_branch 😄

prometheas avatar Apr 02 '18 22:04 prometheas

Hi @prometheas ,

Does docker-make somehow keep track of which tags it has already published, and only run on_tag when it "sees a new tag" in the repository? No, docker-make will not keep track of anything, it is a stateless command line tool, so on_tag will get triggered if docker-make detect there is a git tag attached to the HEAD revision, on_branch:master will get triggered if docker-make detect the HEAD revision is on the master branch.

The way docker-make detects git tags and branches relies heavily on the git commands( git tag --contains HEAD|head -1 and git rev-parse --abbrev-ref HEAD actually), I will try to improve the docs so that users can be more explicitly aware of this mechanism.

Thanks a lot for your proposal ^_^

jizhilong avatar Apr 08 '18 02:04 jizhilong

That is rather clever, indeed. Thank you for shedding light on this for me.

prometheas avatar Apr 08 '18 15:04 prometheas