gpt4 book ai didi

git - 带有 $(GitVersion.NuGetVersion) 的标签源创建带有变量名称而非值的标签

转载 作者:太空狗 更新时间:2023-10-29 13:42:45 25 4
gpt4 key购买 nike

成功构建后,将标签格式配置为 $(GitVersion.NuGetVersion),生成的标签设置为 $(GitVersion.NuGetVersion) 而不是实际的该变量的扩展值。

在构建输出日志记录中,有 2 个部分/计划:构建和完成构建。

据推测,一旦构建代理移动到第二部分/计划,所有变量上下文/状态都将丢失。

如果 GitVersion 变量的上下文在 Finalize Build 部分丢失,我应该如何使用生成的 GitVersion 标记源?

https://github.com/Microsoft/vsts-agent/issues/716

最佳答案

我在 issue on GitHub 中回答了您的问题:

I don't think there is anything we can do inside of the GitVersion task about this as long as VSTS doesn't provide an appropriate API. GitVersion currently just defines the variables using the ##vso[task.setvariable]value command. Variables are explicitely defined in the task context, and therefor available for subsequent tasks, but not outside of the context.

A special case is the build number for which a special command exists ##vso[build.updatebuildnumber]build number which we are using.

A workaround can be to add an additional task which adds the tag, which will work since the task will be in the same context and have therefore access to the variable.

关于git - 带有 $(GitVersion.NuGetVersion) 的标签源创建带有变量名称而非值的标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41026158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com