Trouble with release numbers

When I started testing with Octopus I was using three position release numbers, e.g. 0.0.1, 0.0.2. After a few successful tests I realized that we will need four position numbers (0.1.0.1). I did a manual release to development with number 0.1.0.2, all seemed to work fine. I then started a build which pushed a new package to the Octopus repo. The automatic deploy worked but it assigned the release number as 0.1.1. What I was expecting is 0.1.0.3. Is this adjustable through lifecycles? Am I doing something wrong? Can automatic deployments increment on the fourth position?

Thank you.

Hi,

Thanks for the question.

You can change your deployment versioning strategy in the Project => Settings page. There is a field called Version template. By default the template is #{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.NextPatch} which will result in versions with three numbers like 0.0.1. I believe you want something like #{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.LastPatch}.#{Octopus.Version.NextRevision} which will create versions like 0.0.0.1.

Hope this helps.

Cheers,
Shane

Related question: Is there a way for releases to follow build numbers? For example the version of the NuGet package?

Brett

This e-mail and/or its attachments are intended only for the use of the addressee(s) and may contain confidential and legally privileged information belonging to CEB and/or its subsidiaries, including CEB subsidiaries that offer SHL Talent Measurement products and services. If you have received this e-mail in error, please notify the sender and immediately, destroy all copies of this email and its attachments. The publication, copying, in whole or in part, or use or dissemination in any other way of this e-mail and attachments by anyone other than the intended person(s) is prohibited.

Yes, very useful, thank you. May I suggest that the version template be added to the “Create release” ==> see [version] example list. I wasn’t aware the template existed and searching for release version in the docs has a lot of results to go through.

Kind regards,

Brett

This e-mail and/or its attachments are intended only for the use of the addressee(s) and may contain confidential and legally privileged information belonging to CEB and/or its subsidiaries, including CEB subsidiaries that offer SHL Talent Measurement products and services. If you have received this e-mail in error, please notify the sender and immediately, destroy all copies of this email and its attachments. The publication, copying, in whole or in part, or use or dissemination in any other way of this e-mail and attachments by anyone other than the intended person(s) is prohibited.

Hi Brett,

The release can follow your NuGet package versions by going to that same Project -> Settings page and changing Release versioning to “Use the version number from an included NuGet package”.

Cheers,
Shane

I really need to learn to look through the screens closer. Thank you for answering.