How can I give, version template in Release versioning (in settings). for getting output version like this <latest_package_version_pushed>-<channel_name>.
Thanks for your question, and welcome to the Octopus community!
Unfortunately, the version you desire isn’t achievable using the Generate version numbers using a template option in the Release versioning in settings directly. The reason for this is that it doesn’t include support for packages:
There are two alternatives that might work for you, however:
- Use the Use the version number from an included package option and choose the step with the package in you to want to use. Then when you create your packages, you would create the package with the version you required e.g. MyPackage.126.96.36.199-channelname.zip. This would require your build server to have knowledge of what channel you’re intending to create a release for.
- Create releases outside of Octopus by specifying the version number yourself. This would essentially mean not using the Release versioning template in Settings, but allows you to have full control over what the release should be called. You can specify the release number in many of our build server plugins, or indeed the Octopus CLI create-release command.
Please see our release versioning documentation for further details on the template capabilities:
I hope that helps!