Build.SourceVersion is blank in VSO vNext Build

前端 未结 3 1260
耶瑟儿~
耶瑟儿~ 2020-12-11 04:00

I am using the new scriptable build features in Visual Studio Online (not the XAML build definitions), and I am trying to have the build version number include the latest Gi

3条回答
  •  鱼传尺愫
    2020-12-11 04:28

    I was able to use $(Build.SourceVersion), but only when builds were triggered automatically on commit (on Continuous integration). It turns out to be empty only if I queue it manually:

    I'm using the following Build number format:

    $(BuildDefinitionName)_$(date:yyyyMMdd)_$(Build.BuildId).$(Build.SourceVersion)$(rev:.r)
    

提交回复
热议问题