Is it possible to set an VSTS Build variable in a Build Step so that the value can be used in a subsequent Build Step?

前端 未结 4 957
南笙
南笙 2020-12-30 21:40

I\'m currently using Build in Visual Studio Team Services (was Visual Studio Online), and would like to be able to set a Build Variable in a Build Step so that the new value

4条回答
  •  余生分开走
    2020-12-30 22:24

    When inside of a script you can update a variable by emitting the following in your ps1

    "##vso[task.setvariable variable=testvar;]testvalue"
    

    You can then pass the variable into the next script using $(testvar)

提交回复
热议问题