我在 mac 上安装了 VSTS 构建代理来构建 xamarin iOS 项目。构建工作正常,直到我添加了 powershell 构建步骤。
即使我为 mac ( https://github.com/PowerShell/PowerShell ) 安装了 powershell 并重新安装了代理,VSTS 仍提示它没有能够运行构建的代理。
No agent could be found with the following capabilities: DotNetFramework, Xamarin.iOS, npm
当我禁用构建步骤时,构建工作得很好。
是否可以在 Mac 上运行 powershell 构建步骤?
最佳答案
正如 MrHinsh 澄清的那样,PowerShell 任务不能在 Mac 上使用。
作为一种解决方法,我使用了 ShellScript 任务:
使用以下 bash 脚本:
#!/bin/bash
powershell ./SetAppVersion.ps1
此外,powershell 安装程序似乎没有将 powershell 添加到我的 PATH 中,所以我不得不添加它:
$ export PATH=$PATH:/usr/local/microsoft/powershell/6.0.0-alpha.16
关于powershell - 在安装在 Mac 上的 VSTS 代理中运行 powershell 构建步骤?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42419098/