How do I add the commit sha to my version number?

mharen's Avatar

mharen

10 Mar, 2020 01:42 PM

On a Linux build I am trying to do something like this in my appveyor.yml:

version: 0.0.{build}+{APPVEYOR_REPO_COMMIT}
image: Ubuntu
...

The version property seems to accept only certain variables like build and branch. Are there others, like commit?

  1. Support Staff 1 Posted by Feodor Fitsner on 10 Mar, 2020 05:11 PM

    Feodor Fitsner's Avatar

    You can do like that:

    environment:
      build_version: 0.0.${APPVEYOR_BUILD_NUMBER}+${APPVEYOR_REPO_COMMIT}
    
    init:
    - appveyor UpdateBuild -Version ${build_version}
    
  2. 2 Posted by mharen on 10 Mar, 2020 05:20 PM

    mharen's Avatar

    Perfect, thank you.

  3. mharen closed this discussion on 07 Mar, 2024 06:59 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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM