1
我們使用Octopus Deploy部署我們的應用程序。如果我的WinForm應用程序可以在運行時顯示Octopus Deploy版本號,這將非常有用。獲取Octopus從C#WinForms應用程序部署版本號
是否可以設置Octopus Deploy,以便將存儲在app.config中的變量設置爲Octopus.Release.Number系統變量,以便我可以在運行時檢索版本號?
我們使用Octopus Deploy部署我們的應用程序。如果我的WinForm應用程序可以在運行時顯示Octopus Deploy版本號,這將非常有用。獲取Octopus從C#WinForms應用程序部署版本號
是否可以設置Octopus Deploy,以便將存儲在app.config中的變量設置爲Octopus.Release.Number系統變量,以便我可以在運行時檢索版本號?
根據Variable substitution in files with Octopus 2.3和System Variables您可以:
<add key="OctopusReleaseNumber"value="#{Octopus.Release.Number}" />
在你的配置然後你可以閱讀代碼中的替代值。
啊,這是一個比使用變換更清潔的解決方案! – 2014-09-26 09:19:15
如果它至少起作用,我只是將它們從文檔中拼湊出來,不要在這裏運行。 – CodeCaster 2014-09-26 09:19:53
@Layoric因此隨時取消刪除您的答案,人們可能不會運行八達通2.3,否則它可能無法正常工作。 :) – CodeCaster 2014-09-26 09:34:16