sharpliner / sharpliner

Use C# instead of YAML to define your Azure DevOps pipelines
https://www.nuget.org/packages/Sharpliner/
MIT License
285 stars 21 forks source link

Variables don't serialize into Macro Expression syntax #232

Closed thomhurst closed 1 year ago

thomhurst commented 1 year ago

Given this C#

Script.Inline($"echo {variables["MyVariable"]}"),

The yaml produced is:

  - script: |-
      echo variables['MyVariable']

This doesn't work. For variables to work in string/variable interpolation they need to use Macro expression syntax.

This would be:

  - script: |-
      echo $(MyVariable)
thomhurst commented 1 year ago

233

premun commented 1 year ago

I see some nullability problems on the main build after the merge. I will do one more sanity check in the evening before releasing a new version

thomhurst commented 1 year ago

Hope it's all good :)

premun commented 1 year ago

A new version is out! 1.4.2