Hey, within a powershell script I’m accessing the variable Octopus.Release.Number through $version = ‘#{Octopus.Release.Number}’
I would however like to access the nuget package version that is being deployed, which I believe is in the variable Octopus.Action.Package.NuGetPackageVersion - How would I access this during a powershell script in the deployment process
Thanks for reaching out. Each package step can deploy a different nuget package, and for that reason the variables that hold the package’s info will always be scoped to a specific step.
Depending on the version of Octopus you are using you could use either $OctopusParameters['Octopus.Action[DeployApp 1].Package.PackageVersion'] or $OctopusParameters['Octopus.Action[DeployApp 1].Package.NugetPackageVersion']