根据http://nvie.com/posts/a-successful-git-branching-model/
$ git checkout -b release-1.2 develop
Switched to a new branch "release-1.2"
$ ./bump-version.sh 1.2
Files modified successfully, version bumped to 1.2.
$ git commit -a -m "Bumped version number to 1.2"
[release-1.2 74d9424] Bumped version number to 1.2
1 files changed, 1 insertions(+), 1 deletions(-)
After creating a new branch and switching to it, we bump the version number. Here,
bump-version.sh is a fictional shell script that changes some files in the working
copy to reflect the new version. (This can of course be a manual change—the point
being that some files change.) Then, the bumped version number is committed.
但是我们不是已经命名了分支release-1.2
了吗,我想当我们发布时,我们会将主服务器标记为1.2
,那么./bump-version.sh 1.2
到底在改变什么呢?
谢谢。
发布于 2018-05-04 08:13:06
首先,那篇文章中的脚本是一个虚构的shell脚本。所以这意味着你必须更新你的文件来反映新的版本
在创建了一个新分支并切换到它之后,我们增加了版本号。在这里,bp-version.sh是一个虚构的shell脚本,它更改工作副本中的一些文件以反映新版本。(当然,这可以是手动更改--关键是某些文件会更改。)然后,提交颠簸的版本号。
上面提到的文件是指上面有版本号描述的所有文件。可以是readme.md文件,也可以是gradle文件,也可以是带有版本号的源代码,或者任何东西。
这个文件的示例是django存储库中的init.py文件。因此,对于下一个版本(假设它们会将其编号为2.2.0),该文件应该如下所示
from django.utils.version import get_version
VERSION = (2, 2, 0, 'alpha', 0)
__version__ = get_version(VERSION)
...
编辑:
https://stackoverflow.com/questions/43250569
复制相似问题