如何指定Cake.Azure开发管道中yaml任务的工具版本



我有这个yaml任务来运行构建。蛋糕文件。

- task: cake-build.cake.cake-build-task.Cake@2
displayName: 'Build Sources'
inputs:
script: devops/build.cake
target: Default
verbosity: Normal
arguments: '--Configuration="$(build.configuration)" --Platform="$(build.platform)" --artifactsPath="$(Build.ArtifactStagingDirectory)"'

当这个任务执行时,它总是安装最新版本的Cake.Tool。这是管道日志的一部分:

2021-10-25T20:52:28.6148998Z ==============================================================================
2021-10-25T20:52:28.6149081Z Task         : Cake
2021-10-25T20:52:28.6149119Z Description  : Build with Cake
2021-10-25T20:52:28.6149153Z Version      : 2.1.0
2021-10-25T20:52:28.6149199Z Author       : Patrik Svensson
2021-10-25T20:52:28.6149233Z Help         : [More Information about Cake](https://cakebuild.net)
2021-10-25T20:52:28.6149267Z ==============================================================================
2021-10-25T20:52:29.0331876Z =====================================================
2021-10-25T20:52:29.0332236Z Root = D:Agents0_work265sdevops
2021-10-25T20:52:29.0332411Z Tools = D:Agents0_work265sdevopstools
2021-10-25T20:52:29.0332915Z Cake Tool Path = D:Agents0_work265sdevopstoolsdotnet-cake.exe
2021-10-25T20:52:29.0334592Z Package Feed = 
2021-10-25T20:52:29.0335733Z Running with system diagnostics
2021-10-25T20:52:29.0336048Z =====================================================
2021-10-25T20:52:29.0339302Z Installing Cake Tool (Latest)...
2021-10-25T20:52:29.0577395Z [command]"C:Program Filesdotnetdotnet.exe" tool install --tool-path D:Agents0_work265sdevopstools/ Cake.Tool
2021-10-25T20:52:37.3622249Z You can invoke the tool using the following command: dotnet-cake
2021-10-25T20:52:37.3622761Z Tool 'cake.tool' (version '1.3.0') was successfully installed.
2021-10-25T20:52:37.3766624Z 

在本例中,它安装了1.3.0版本。我如何修复这个版本号?例如,我如何告诉它总是使用1.0.0版本。我没有找到任何关于这个的文档。

您应该能够使用版本属性

指定版本
- task: cake-build.cake.cake-build-task.Cake@2
displayName: 'Build Sources'
inputs:
version: 1.0.0
script: devops/build.cake
target: Default
verbosity: Normal
arguments: '--Configuration="$(build.configuration)" --Platform="$(build.platform)" --artifactsPath="$(Build.ArtifactStagingDirectory)"'

相关内容

  • 没有找到相关文章

最新更新