OctopusDeploy / cli

| Public | Next Generation of the Octopus CLI :octopus:
Other
35 stars 10 forks source link

feat: add delete build information command #368

Closed hnrkndrssn closed 4 months ago

hnrkndrssn commented 4 months ago

Builds on #366 so that should be reviewed and merged first.

Delete build information command

$ octopus build-information delete
$ octopus build-info rm
$ octopus build-info del

Delete build information by id

$ octopus build-info rm BuildInformation-10004
? You are about to delete the build information "TheOtherPackage 1.2.5" (BuildInformation-10004). This action cannot be reversed. To confirm, type the build information name: TheOtherPackage 1.2.5
✔ The build information, "TheOtherPackage 1.2.5" (BuildInformation-10004) was deleted successfully.

Delete build information using package id and version

$ octopus build-info rm --package-id ThePackage --version 1.2.3
? You are about to delete the build information "ThePackage 1.2.3" (BuildInformation-10001). This action cannot be reversed. To confirm, type the build information name: ThePackage 1.2.3
✔ The build information, "ThePackage 1.2.3" (BuildInformation-10001) was deleted successfully.

Delete with auto-confirmation

$ octopus build-info rm --package-id ThePackage --version 1.2.4 -y

If --package-id is specified --version must also be specified

$ octopus build-info rm --package-id ThePackage
--version must be specified when --package-id is used

[sc-83928]