Version Counter

Would it be possible to implement an option to disable automatic version counter increment and additionally add an action to do it?

scenario:
we have specific version schemas which should be increment in specific situations only. to have a consistent look, we want the builds in the build server to mirror the version string of the application (works great so far) and we don’t want to increment to version string in code, we have to commit first.

so our thought is, that we disable the version counter and add a “increment version counter” action in the deploy stage, so we can control it using the build server stages.
sometimes a version needs more commits (testing fails etc.) and we always have to reset the version counter for the build we want to deploy. this also leads in confusing builds in one configuration.

however, we could program something by hand (variable increment by shell script …) but we think, this would be a much simpler, easier solution.

thanks in advance and we are still very happy with the product. we changed a lot of internal process in the last time where Continua still fits or was easily adoptable (for sure, this also relies on my perfect  configuration settings ;-)).

Hi Christian,

The problem with incrementing the build number as an Action, is that we cannot be sure what will happen if multiple builds run at the same time. This is why we currently increment the build number right at the start of the build to prevent the numbers getting out of order. 

Another issue with providing the option not to increment the build number would be that we would end up with more than one build having the same version label which could be confusing to some people - although this is what you are currently doing manually.

We have been discussing the possibility of implementing a persistent store on the server for storing variables between builds. We would allow these persistent configuration variables to be accessed in expressions and set using the Set Variable action. There are of course still issues with concurrency and also with locking - especially as the actions run on agents and need to communicate changes to the server. This is however something we hope to implement eventually and could then be used to facilitate the type of functionality you are looking for. 

Meanwhile your best option is to write a program that increments a counter in some external data store. This program could then write custom log messages to the console to send the value back to Continua. e.g. @@continua[setBuildVersion value=‘1.2.3.4’ ] or @@continua[setVariable name=‘versionNumber’ value=‘1.2.3.4’ ]

well, builds with the same version are already possible now (we do it, by resetting the counter to the previous value for specific configurations) because we cannot delete a single build (would be great if this could be done. maybe if you have a specific permission only).

you can increment the version counter when starting the build you should just now save it