Run powershell build step in VSTS agent installed on mac?

后端 未结 6 852
暖寄归人
暖寄归人 2021-01-23 22:46

I installed VSTS build agent on mac to build xamarin iOS project. Builds worked fine until I added powershell build step. Even though I installed powershell for mac (https://git

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-23 23:43

    As MrHinsh clarified, the PowerShell task cannot be used on Mac.

    As a workaround I used ShellScript task:

    With the following bash script:

    #!/bin/bash
    powershell ./SetAppVersion.ps1
    

    Also, the powershell installer did not seem to add powershell to my PATH so I had to add it:

    $ export PATH=$PATH:/usr/local/microsoft/powershell/6.0.0-alpha.16
    

提交回复
热议问题