tag:help.appveyor.com,2012-11-13:/discussions/suggestions/730-support-next-build-number-0-zeroAppVeyor: Discussion 2018-10-19T08:17:18Ztag:help.appveyor.com,2012-11-13:Comment/373019322015-07-05T12:12:21Z2015-07-05T12:38:53ZSupport next build number == 0 / zero<div><p>Hi Feodor,</p>
<p>hear me out on this crazy idea for a sec... :)</p>
<p>I hoping we could reset the <strong>Next Build Number</strong>
== 0 / zero. Right now, it has to be 1 or greater.</p>
<p>The rational is this: `version: '1.{build}.0'</p>
<p>So, when I'm ready to create a <code>master</code> build of my
library, i want to start out at <code>1.0.0</code>. And any other
releases will be <code>1.1.0</code>, <code>1.2.0</code> etc.</p>
<p>If the api changes, then i need to <em>manually</em> bump the
version to <code>2.0.0</code> (which means <code>version:
'2.{build}.0'</code> <-- only the <code>1</code> is manually
changed to <code>2</code>). I'll reset the Next Build Number back
to zero, merge dev -> master .. and my master CI kicks off,
builds, packages then deploys for me.</p>
<p>Or .. is there a better way?</p>
<p>DOCS REF: <a href="http://www.appveyor.com/docs/build-configuration#build-versioning">
http://www.appveyor.com/docs/build-configuration#build-versioning</a></p>
<p>UPDATE: Also, Pull Request <em>tests</em> from GitHub also
increment the build number.<br>
So when I merge from <code>dev -> master</code> .. GH does a
check to see if this code will work, right .. it does the entire CI
<em>except</em> any deployment (yay! this is a nice merge-test...).
When it's ok .. i then manually click the <code>merge</code> button
and boom! CI fires off again .. but the build number is
<em>again</em> incremented :(</p>
<p>This messes up my versioning for nuget packages if I wanted to
do this auto-magically ...<br>
I would love the <em>option</em> to not increase the build number
for PR-tests.</p></div>Pure Krometag:help.appveyor.com,2012-11-13:Comment/373019322015-07-05T20:35:43Z2015-07-05T20:35:56ZSupport next build number == 0 / zero<div><p>Yeah, it's like two problems in this post :) Allowing 0 for next
build number is doable - I filed a new issue: <a href="https://github.com/appveyor/ci/issues/324">https://github.com/appveyor/ci/issues/324</a></p>
<p>Seems like you don't necessary need to derive your version from
from AppVeyor's build number. You can maintain version in
AssemblyInfo.cs and if you need it in build context you can use a
simple PowerShell script: <a href="https://gist.github.com/FeodorFitsner/e038821e3e46e3df0e8f">https://gist.github.com/FeodorFitsner/e038821e3e46e3df0e8f</a></p>
<p>Then using <a href="http://www.appveyor.com/docs/build-worker-api#update-build-details">
update version API</a> you can update build version to something
like <code>%my_version%-(%appveyor_build_number%)</code></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/373019322015-07-08T00:37:55Z2015-07-08T00:39:38ZSupport next build number == 0 / zero<div><blockquote>
<p>You can maintain version in AssemblyInfo.cs</p>
</blockquote>
<p>I was basically hoping to <em>avoid</em> doing this for most
builds ... <em>except</em> when it's for a major version change
(following sem-ver).</p>
<p>Remember, this is when we do builds for production .. so this
means we PR from <code>dev</code> -> <code>master</code> and the
AV project kicks off (<code>branch -> only: master</code>).</p>
<p>So for most of the time it's not a major version. (think =>
this is for nuget repo's and our own website repo's).</p>
<p>so in effect, this is changing the <code>b</code> in
<code>a.b.c.d</code> semver.</p>
<p>so this means -> we don't want to <em>remember</em> to
touch/bump the <code>AssemblyInfo.cs</code> file when we need to do
a release 95% of the time.</p>
<p>for the remaining 5% - it's the rare occasion of a major semver
change .. which means:</p>
<ol>
<li>we reset build counter to zero.<br></li>
<li>we update the <code>appveyor.yml</code> from <code>version:
'2.{build}.0' to</code>version: '3.{build}.0'`</li>
</ol>
<p>unless, i misunderstood what you're saying :blush:</p></div>Pure Krometag:help.appveyor.com,2012-11-13:Comment/373019322015-07-08T00:53:22Z2015-07-08T00:53:22ZSupport next build number == 0 / zero<div><p>OK, I see. Then for now we are going to <code>0</code> in next
build number.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/373019322015-07-14T03:38:44Z2015-07-14T03:38:44ZSupport next build number == 0 / zero<div><p>It's been deployed.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/373019322015-07-14T04:06:56Z2015-07-14T04:06:56ZSupport next build number == 0 / zero<div><p>H U G</p></div>Pure Krome