Passing the version to a PS Script

superjmn's Avatar

superjmn

31 Dec, 2016 07:11 PM

In my YML I have the following

version: 2.0.0.{build}

after_build:
- ps : .\Create-NugetPackages.ps1 -Version {version}

However, the {version} variable is not replaced by the actual version number. The command is invoked with the literal string, like this:

https://ci.appveyor.com/project/SuperJMN/omnixaml/build/2.0.0.30#L135

I hope you can help me :)

Thanks a happy new year to all the AppVeyor Team!

  1. Support Staff 1 Posted by Feodor Fitsner on 31 Dec, 2016 10:39 PM

    Feodor Fitsner's Avatar

    You should take build version from environment variable:

    - ps : .\Create-NugetPackages.ps1 -Version $env:appveyor_build_version
    
  2. 2 Posted by superjmn on 01 Jan, 2017 08:29 PM

    superjmn's Avatar

    It worked! Thank you!

  3. superjmn closed this discussion on 01 Jan, 2017 08:29 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac