Octo create-release with multiple defaultpackageversions

Chaps,

We use octo command line to create the release as part of our build process but i’ve come across an issue which i’m hoping you can help with.

In my scenario i build a release using the powershell below:
$command = ‘C:\Program Files\Octopus Deploy\OctoCommand\octo.exe’;
&$command create-release --server=$octopus --project="$project" --apikey=$apikey --releasenotesfile=Results\releasenotes_internal.htm --defaultpackageversion=$releaseVersion --deployto=“SYS1”

In this project i deploy two nugets. One is a utils package and one is the actual application. Is there a way that i can “fix” the utils package to use latest version always? right now the release fails as it uses the defaultpackageversion for all packages…

I hope i used the correct words in the correct order…

Ta,

Cedric

Hi Cedric,

Thanks for getting in touch! Instead of using --defaultpackageversion you can use --package for each of your packages where one references $releaseVersion and the other uses latest.

So for example: --package="step name:latest" --package="step name:$releaseVersion" where the step name matches the package step name.

Let me know what you think.
Vanessa

Hi Vanessa,

Sorry I didn’t see –package in the help. I’ll open my eyes next time…

I’ve tried this but get
The version portion of the package constraint ‘Deploy trace manager:latest’ is not a valid semantic version number.

Can I not specify a token for latest or do I need to specify an actual version number?

Ta,

Cedric

Hi Cedric,

Yes sorry, you will need to specify the package version. Latest is only available for the release version itself.

Vanessa