是否可以使用git / github添加版本号 [英] Is it possible to add a version number using git / github

查看:308
本文介绍了是否可以使用git / github添加版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Github,并且意识到他们有一个很好的访问repo信息的API,比如提交,谁做了这些等。



这将是一个很棒的在外部网站上显示项目的以前版本的方法,但是我想知道是否有一种已知的方法来向主提交添加版本号?



版本号会自动增加与每个主提交或我可以手动设置它。



我知道我可以将它添加到笔记,但我不熟悉,如果有是一种分离它的方法。

解决方案

您可以使用标签设置版本号。您可以在git标签手册页上阅读有关tag命令的信息。在工作中,我设置了我们的构建服务器以自动增加构建版本号,然后使用标签对其进行应用。我认为这会满足您的需求?

I'm using Github, and realized they have a nice little api for accessing repo information like commits, who did it, etc.

This would be a great way to show previous versions of the project on an external site, but I was wondering if there is a known way to add a Version Number to the master commit?

So the version number would either automatically increase with each master commit or I can manually set it.

I know I can add it in the notes, but I'm not familiar if there is a way to separate it.

解决方案

You can use a tag to set a version number. You can read about the tag command on the git tag man page. At work I setup our build server to automatically increment a build version number which is then applied using a tag. I think this will meet your needs?

这篇关于是否可以使用git / github添加版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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