我在 azure 中有一个存储库,它有默认分支“main”。
另外,我在 yml 文件中有一项用于语义版本控制的任务。
- task: gittools.gitversion.gitversion-task.GitVersion@5
displayName: Get Semantic Git Version
我遇到了以下错误
没有找到个人/release1分支的分支配置,正在下降
回到默认配置 System.InvalidOperationException: Could
无论是本地还是远程都找不到“开发”或“主”分支。
所以,我刚刚创建了一个开发分支并触发了构建,然后语义版本就成功了。
我们不想按照指导方针维护开发或主分支。
在不维护master和develop分支的情况下如何克服错误呢?
Thanks
纳雷什·埃德
看来这还不支持GitTools\GitVersion https://github.com/GitTools/GitVersion/issues/2433目前仍在等待解决方案。
但为了克服这个问题,你可以提供 GitVersion.yml 文件
mode: ContinuousDelivery
branches:
master:
regex: main
mode: ContinuousDelivery
tag:
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
feature:
regex: feature(s)?[/-]
mode: ContinuousDeployment
develop:
regex: dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: alpha
hotfix:
regex: hotfix(es)?[/-]
mode: ContinuousDeployment
tag: beta
release:
regex: release(s)?[/-]
mode: ContinuousDeployment
tag: rc
ignore:
sha: []
然后像这样使用它
steps:
- task: GitVersion@5
inputs:
runtime: 'core'
configFilePath: 'GitVersion.yml'
updateAssemblyInfo: true
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)