我們有時侯需要獲取tag的message,比如在通過tag觸發CI/CD的時候,方法是:
獲取最新的tag
tag=$(git describe --abbrev=0)
獲取tag的message
git tag -l --format='%(contents)' $tag
如果希望把messge存到變量裏面
message=$(git tag -l --format='%(contents)' $tag)
我們有時侯需要獲取tag的message,比如在通過tag觸發CI/CD的時候,方法是:
獲取最新的tag
tag=$(git describe --abbrev=0)
獲取tag的message
git tag -l --format='%(contents)' $tag
如果希望把messge存到變量裏面
message=$(git tag -l --format='%(contents)' $tag)
https://blog.csdn.net/youyudehan/article/details/133357915