我正在为 AzureDevOps 使用 Gitversion 任务 5.1.2。
我的分支策略是 GitFlow。
从开发分支输出:
Base version used: Git tag '3.0.0-beta.5': 3.0.0-beta.5 with commit count source 35fb4fe5e51526375e94f61dfc3cca421d235c11 (Incremented: 3.0.0-beta.6)
我期待的是3.0.0-beta.6,从上面的行我可以看到它正确计算了元数据,到目前为止还不错,但最后更新号是3.0.0-beta.1,如下图.
INFO [11/27/19 19:13:42:97] 1 commits found between 35fb4fe5e51526375e94f61dfc3cca421d235c11 and c6bf7b9b86727f1fcd944dc32d7e34be57e4c0cc
INFO [11/27/19 19:13:43:00] Begin: Creating dictionary
INFO [11/27/19 19:13:43:01] End: Creating dictionary (Took: 8.32ms)
INFO [11/27/19 19:13:43:02] Begin: Storing version variables to cache file D:\a\1\s\.git\gitversion_cache\0DA5D62C7623C962136858D6D06616CC294FEB91.yml
INFO [11/27/19 19:13:44:07] End: Storing version variables to cache file D:\a\1\s\.git\gitversion_cache\0DA5D62C7623C962136858D6D06616CC294FEB91.yml (Took: 1,053.64ms)
INFO [11/27/19 19:13:44:43] Applicable build agent found: 'VsoAgent'.
Executing GenerateSetVersionMessage for 'VsoAgent'.
Executing GenerateBuildLogOutput for 'VsoAgent'.
INFO [11/27/19 19:13:44:45] Updating assembly info files
INFO [11/27/19 19:13:44:47] Found 1 files
##[section]Async Command Start: Update Build Number
Update build number to 3.0.0-beta.1 for build 4043
我的 GitVersion.yml
mode: ContinuousDelivery
branches:
master:
regex: master
tag: ''
release:
regex: releases?[/-]
tag: rc
feature:
regex: features?[/-]
tag: alpha
develop:
regex: dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: beta
ignore:
sha: []
merge-message-formats: {}
我不明白为什么?
有人可以帮我吗?