zhidanwang

通过shell 脚本自动获取最新tag,并输入最新版本后,推到git上

# 拉取分支上现有的tags

git fetch --tags

echo -e "所有tag列表"
git tag -l -n


echo -e "${tagList}"
#获取最新版本tag
LatestTag=$(git describe --tags `git rev-list --tags --max-count=1`)

echo -e "最新版本tag......"
echo -e "$LatestTag"

echo -e "请输入要新增的版本号...... 如 v1.0.1"
#输入tag名称
read tagName

git tag ${tagName}
#推到分支上
git push origin ${tagName}

相关文章:

  • 2018-07-21
  • 2021-08-13
  • 2022-12-23
  • 2021-07-01
  • 2021-09-29
  • 2021-10-31
  • 2021-09-30
  • 2021-11-06
猜你喜欢
  • 2021-08-17
  • 2019-01-19
  • 2021-09-11
  • 2022-12-23
  • 2021-12-13
  • 2021-07-03
  • 2021-04-25
相关资源
相似解决方案