log.info(🍺);|

大哥超帅

园龄:5年11个月粉丝:2关注:5

jenkins pipeline : 使用sh脚本自动打git tag

if [[ "${GIT_BRANCH}" == "xxx" ]]; then
    TAG_VERSION="V"$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q | sed 's/-SNAPSHOT//')

#如果没拉到分支先fetch 一下
# git fetch
git checkout

git tag  "${TAG_VERSION}"

git push origin "${TAG_VERSION}"

fi

本文作者:大哥超帅

本文链接:https://www.cnblogs.com/funkboy/p/17496473.html

版权声明:本作品采用CC 4.0 BY-SA版权协议许可协议进行许可。

posted @   大哥超帅  阅读(218)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起