Octo.exe delete-releases

Hi,

We have a number of environments used for feature branches that will be recreated (in Azure) at the end of a phase of development. When the VM is rebuilt, one of the tasks is to delete all releases for that project (we are reusing the same projects in Octopus).

From the command line I’m running:
.\Octo.exe delete-releases --project “TestPortal - All” --minversion=“2.0.30-FEA-A” --maxversion=“2.0.41-FEA-A” --whatif --server “***” --apikey “***”

However, this is deleting releases without the -FEA-A suffix on the release name?

Output:
Finding project: TestPortal - All
Finding releases for project…
[Whatif] Version 2.0.40 would have been deleted
[Whatif] Version 2.0.39-FEA-A would have been deleted
[Whatif] Version 2.0.38-FEA-A would have been deleted
[Whatif] Version 2.0.37-FEA-A would have been deleted
[Whatif] Version 2.0.36-FEA-A would have been deleted
[Whatif] Version 2.0.35-FEA-A would have been deleted
[Whatif] Version 2.0.34-FEA-A would have been deleted
[Whatif] Version 2.0.33 would have been deleted
[Whatif] Version 2.0.32 would have been deleted
[Whatif] Version 2.0.31 would have been deleted
[Whatif] Version 2.0.30 would have been deleted

Hi Chris,

Thanks for getting in touch! Unfortunately this function uses the min and max as SemVer ordering, so the releases without the suffix are technically correctly being listed as they are between those two versions.
There is no way currently to define inclusions to the version range such as a tag. I can find out if it could be limited to a channel however.
Would this help?

Vanessa

Thanks for the update. If you could confirm if a channel can be used to restrict the releases matched then that would be useful.

Hi Chris,

We decided that adding a channel flag for this feature makes sense.
I added an issue you can track here: https://github.com/OctopusDeploy/Issues/issues/2371

It isn’t a high priority however so it will be done in order.

Vanessa