tag:help.appveyor.com,2012-11-13:/discussions/questions/32509-force-pre-release-version-number-in-branchAppVeyor: Discussion 2019-03-04T21:01:25Ztag:help.appveyor.com,2012-11-13:Comment/467385692019-01-02T17:29:46Z2019-01-02T17:29:46ZForce Pre-release version number in branch<div><p>Hi, Allan.<br>
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 <a href="https://www.appveyor.com/docs/build-worker-api/#update-build-details">here</a>.<br>
You could combine that with some logic that checks for the value of <code>APPVEYOR_REPO_BRANCH</code> (one of the <a href="https://www.appveyor.com/docs/environment-variables/">environment variables</a> set by AppVeyor for every build) and renames version accordingly.<br>
Or, instead of including logic to determine which branch is building, you could make use of conditional build configuration as described in <a href="https://www.appveyor.com/blog/2017/08/01/sharing-configuration-between-branches-in-appveyor-yml/">this blog post</a>.<br>
Here is a hypothetical example.</p>
<pre>
<code>for:
-
branches:
only: master
before_build:
- appveyor UpdateBuild -Version <release-version>
-
branches:
only: /dev-.*/
before_build:
- appveyor UpdateBuild -Version <pre-release-version></code>
</pre></div>Owen McDonnell