Affects Version/s: None
Fix Version/s: 3.7.0
Currently `cf-promises -T` will generate cf_promsies_release_id with the SHA of HEAD for the currently checked out branch, or in the event that the directory is not a git repository it will fall back to generating a sha of the tree.
This works great if you are always running the latest code for a given branch. However if you are checking out a tag it then it falls back to generating a sha of the tree.
I believe this was an oversight as it's most common to check out a branch. But it does not make sense to fall back to self generation if a specific commit is checked out.
It would be extra nice if it recorded the tag name in addition to the sha if in fact the commit checked out is a tag.
> $ git checkout master [±master ●▴]
Already on 'master'
Your branch is ahead of 'origin/master' by 8 commits.
(use "git push" to publish your local commits)
nickanderson@nickanderson-ThinkPad-W520 ~/CFEngine/masterfiles [12:38:40]
> $ git name-rev --name-only --tags HEAD [±master ●▴]
> $ git checkout 3.7.0b1 [±master ●▴]
Note: checking out '3.7.0b1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at a9d202e... Beta.
nickanderson@nickanderson-ThinkPad-W520 ~/CFEngine/masterfiles [12:39:37]
> $ git name-rev --name-only --tags HEAD [±a9d202e ●]