How to get git tag message?


I usually do tagging using this command
git tag -a v0.0.1

After the command running, the terminal will display input for tag messages, I input some messages in it then push tag to origin.

My question is, how I get those message? Currently I use Generate Changelog step but it’s not working. Also I tried using exposed variable $BITRISE_GIT_MESSAGE but it’s only provide message from last git commit in the tag.

Please halp… :smiley:

To anyone looking for this solution, you can use:

GIT_TAG_MESSAGE=$(git tag -l --format='%(contents)' $BITRISE_GIT_TAG)

then export the variable using envman

envman add --key GIT_TAG_MESSAGE --value "$GIT_TAG_MESSAGE"

Your tag message will available inside $GIT_TAG_MESSAGE


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.