Force Pre-release version number in branch
Hi,
New to yml files and AppVeyor but so far the experience has been awesome. My question relates to how I can setup the version number depending on the branch type. e.g. master always builds release versions, but any other branch will change the patch and append a pre-release value so that when the nuget package is built, it deploys to NuGet.org and will be displayed as a pre-release package.
I don't want to manually have to change the file version or package versions as part of checkins, etc.
Is this possible, can someone help with the yml too?
thanks in advance.
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
Support Staff 1 Posted by Owen McDonnell on 02 Jan, 2019 05:29 PM
Hi, Allan.
It's hard to give too specific advice without seeing your current configuration file but you can find information about using the build worker API to alter build details here.
You could combine that with some logic that checks for the value of
APPVEYOR_REPO_BRANCH
(one of the environment variables set by AppVeyor for every build) and renames version accordingly.Or, instead of including logic to determine which branch is building, you could make use of conditional build configuration as described in this blog post.
Here is a hypothetical example.
Ilya Finkelshteyn closed this discussion on 04 Mar, 2019 09:01 PM.