我们使用 Octopus Deploy 来部署我们的应用程序。如果我的 WinForm 应用程序可以在运行时显示 Octopus Deploy 版本号,那将非常有用。
是否可以设置 Octopus Deploy 以便将存储在 app.config 中的变量设置为 Octopus.Release.Number 系统变量,以便我可以在运行时检索发布号?
我们使用 Octopus Deploy 来部署我们的应用程序。如果我的 WinForm 应用程序可以在运行时显示 Octopus Deploy 版本号,那将非常有用。
是否可以设置 Octopus Deploy 以便将存储在 app.config 中的变量设置为 Octopus.Release.Number 系统变量,以便我可以在运行时检索发布号?
根据带有 Octopus 2.3和系统变量的文件中的变量替换,您可以:
<add key="OctopusReleaseNumber"value="#{Octopus.Release.Number}" />
在您的配置中使用然后您可以从代码中读取替换值。