Add Octopus Release number to the Nuget Package Version number in the release version
I would like to use the Nget package version in my OD release version so that shows up in the dashboard. In the project settings you give the option to do so which is great. But if you select this option and attempt to make process changes to the project you need to create a new OD release. When you attempt to do so, OD says you need to change the version number and it will only allow 4 parts to the version name.
I think the release number should have the option include multiple sections, the Nuget Package version and the OD release number.
I would like to do something like this in the version number template.
{Octopus.Version.NugetPackage}_#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.NextPatch}
or
{Octopus.Version.NugetPackage}_i
Creates:
For example: The Nuget package version is 3.12.0.5
3.12.0.51
3.12.0.52
3.12.0.5_3

-
John Macdonald commented
Would be great to be able to include "Use the version number from an included package" option within the "Generate version numbers using a template" e.g.
#{Octopus.Release.Package[your.package.name].Version}.#{Octopus.Version.NextPatch}
Assuming a "release" is a combination of a build + configuration, and the config is stored in Octopus, if you use just "Use the version number from an included package" having changed the config you cannot redeploy without recreating your package.
Using the template option the release number becomes less meaningful
-
Alexey commented
Need the same
-
Alexander Rauan commented
This would be a great addition for us as well. Like others here we also base our version numbering on the nuget package version and channel (1.2.3-dev, 1.2.3-qa, 1.2.3-prod...)
Understanding that there are complications with this feature (multiple packages per deployments and so on) my suggestion to solve this would be to add a "suffix" option when defining version number from an included package.
So at "Settings" -> "Release Versioning" -> "Use the version number from an included package" maybe it's possible to add an optional input field for suffix. This way we'd be able to automatically create version numbering based on a concrete package step in the process + a custom suffix (ie. channel name).
-
John Baker commented
Allowing a custom format based on the Nuget Package version would be valuable for us. We use the package version for the release versions, but we also add SymVer metadata to packages which we would like to exclude from the Octo release name.
-
dragon788 commented
You can use the -text syntax to build a new release without incrementing the number, but this is only useful if you don't require it often.
-
Branden DeVries commented
I attempted to do this:
#{Octopus.Action[CHPD].Package.NuGetPackageVersion}_i in the project version template, but got this error when attempting to create a release:There was a problem with your request.
Please enter a valid Semantic Version, for example '1.3', '1.3.1-beta0001' or '1.3.1.9000'.
The version number is too long. Please enter a shorter version number.