Setting CIRCLE_TAG
Triggering a build can resolve the CIRCLE_TAG built-in environment variable not being set.
The reason CIRCLE_TAG is not showing in your build could be that the first webhook being sent to CircleCI from GitHub / Bitbucket that is processed did not contain the tag information necessary for CIRCLE_TAG to be populated. The order of webhooks sent is influenced by the command used to push the commit.
To ensure that the first hook from GitHub that is processed is the one with the tag information, try pushing the commit by first pushing the tag rather than to the branch, e.g. using git push origin <tag-name>
Comments
Article is closed for comments.