We currently have a decoupled setup between build number and release number. I.e. Project could have build number 1.2.2342.1 and release number 0.1.234.
We would like to use the build number (i.e. package nuget number) plus a auto incremented value.
E.g.
A package with id 1.0.17002.4 (which is our build number) is pushed to the Octopus server, a release called 1.0.17002.4.0 should be created.
If a manual release is created with the same package (e.g. variables have changed etc.) next version number should be 1.0.17002.4.1
and so on.
Is it possible to reference the package nuget id in the Release number template?
Or is there another way to achieve what we would like?
Thanks for getting in touch! I had a chat with the developers about this, it looks like splitting the package number and build number that way is not going to work in Octopus unfortunately.
It looks like the only option to have it work similar to what you want is to select the Use the version number from an included package feature under Release versioning in your project settings. After you have set that, you can increment it by placing a .i or simply a number you wish after the release number when creating the release. I have attached a screenshot showing where this can be done.
Also, something to note is that Octopus follows strict SemVer rules and 1.0.17002.4.0 would not be handled by Octopus. You would need to drop it down to 3 decimals leaving a 4th for the incremental versioning.
If you would like some more information on the SemVer rules you can check out their website. http://semver.org/
Again, sorry for the bad news, hopefully that workaround is suitable for your needs. Feel free to let me know if I can explain this better or if you have any further questions.