How to iterate a version number only during deployment of Master branch.

sedwards's Avatar


13 Apr, 2018 01:18 AM

I would like to use a 4 position version number, but I am having trouble figuring out how I can iterate the numbers to suit my purpose.

I would define the positions as:
1 - Major (iterated manually in yml file)
2 - Minor (iterated manually in yml file)
3 - Release (should iterate only when a successful build is deployed to production
4 - Build (this would use the {build} variable already supplied by Appveyor

#3 above is the one I am struggling with. Is there a way to set a persistent variable that I can access in later builds via PowerShell so I can ++ to iterate the release number? I see that I can run PowerShell scripts to set the version number in init, but I am unsure of how to proceed when I am acting on a specific branch (technically a PR)

My ultimate hope is to also use the first 3 positions (1.2.3) when pushing releases to GitHub and when patching my .NET Core assembly files for public display.

Any help would be appreciated!

  1. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 AM.

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

Keyboard shortcuts


? 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