Release versioning with varibles

Hello,
My goal is to have a release version for a project to be #{CurrentNugetpackage}.#{Octopus.Version.NextRevision}.

Currently our Nuget package is coming from TeamCity, and is in ##.## format. I would like to use Octopus.Action[x].Package.NuGetPackageVersion, but am unsure on what to put for ‘x’.

Any help would be appreciated.

ping…

Hi Chris,

Thanks for reaching out and sorry for the delay. This isnt possible from the Octopus UI as we cannot calculate the release version based on the nuget package version.

What you could do is setup the release version when calling Octo.exe from your TeamCity build by passing the –version parameter. From the build it shouldnt be hard to get the current package version to build the version number. Now for the Octopus.Version.NextRevision you can use this powershell snippet below, which will get the full next release number, where the last part of it should be the NextRevision.

Hope that helps!

Dalmiro.