Determining the octopus release number

I’m looking for advice on how to determine, from within my .ps1 deployment scripts, the value of the octopus release number.

I thought Octopus might define variable “OctopusReleaseNumber”, but of the 9 predefined variables identified in the wiki, it’s the only one that my deployments seem to miss.
That is, I haven’t seen it in the logs of my deployments, and I get an empty string when asking my .ps1 deployment scripts to write the value of $OctopusReleaseNumber.
My portal is on v0.9.620.4 and my tentacles a mix of v0.9.620.3 and v0.9.620.4

Is there a way to determine, from the .ps1 scripts, the value of the octopus release number?


Hi Lisa,

You are right, a bug in the last release meant that the OctopusReleaseNumber wasn’t being set. If you need a unique number you can use the OctopusTaskId variable. I’ll try to create a patch release tonight to fix this issue (it will be an Octopus Server change)


Hi Paul,

Thanks for the info about the variable. I’ll look for it in future releases.
And many thanks for hosting the support forum - I’ve found it a very helpful community.


Hi Lisa,

Just to let you know, this is now fixed in 1.0 releases of Octopus.