自动标记发布 [英] Automatic tagging of releases

查看:79
本文介绍了自动标记发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在git中标记发行版本?

How do you tag your release versions in git?

现在,我已经通过内部版本号标识了每个发行版,但是即使存储库中没有更改,它们也会增加.我的想法是让它在登台服务器上成功部署后自动生成.例如

Now I have each release identified by build number, but they increment even if there are no changes in the repo. My idea is to have it generated automatically on successful deployment on staging server. E.g.

  • 运行Hudson构建
  • 成功后,添加新标签,即1.0-1
  • 在下一个成功版本上添加下一个标记1.0-2
  • 显示
  • 版本标签,然后在网站页脚中显示
  • run Hudson build
  • when successful, add new tag, i.e. 1.0-1
  • on next successful build add next tag, 1.0-2
  • version tag is displayed then in site footer

这将需要:

  • Hudson管理下一个版本号
  • 或将最后一个标签存储在某些文件中的脚本
  • 或解析git标签以确定最后一个

有什么提示吗?

推荐答案

您正在谈论的内容更类似于一个git describe将会生成.

What you are talking about is more akin to a technical revision number like the one a git describe would generate.

与真正的应用程序版本不同,您仍然应该独立于Hudson对其进行管理,因为它

That is different from a true application version, which you should still manage independently from Hudson since it depends on a versioning policy.

这篇关于自动标记发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆