Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
37 stars 19 forks source link

dce -v, --version #40

Closed marinatedpork closed 4 years ago

marinatedpork commented 4 years ago

As a user, I would like a CLI command that returns the current version of the CLI that I am using. Something like:

$ dce -v
=> v0.2.0

Maybe it could also include the version of DCE that I have deployed as well:

$ dce -v
=> DCE CLI: v0.2.0
=> DCE: vX.Y.Z
drmmarsunited commented 4 years ago

I'm giving this an official plus one, as I'm working with a team who would like to implement DCE. However, we ran into an issue where we wanted to rollback the initial dce system deploy, and had previously found an open issue about it. In that issue, instructions to rollback the deployment were divergent upon the version of the CLI used.

If a critical piece of functionality, such as destroying a Terraform state or rolling back a CLI deployment, is gated around product versions, then we must have a way to track the version of what is installed.

Will try to drop a PR for you guys for this effort.

drmmarsunited commented 4 years ago

So I dug into the codebase here, and I'm wondering what is controlling your release versions. It looks like the build pipeline is only triggered based on a release of a tag that starts with v, so you are assigning your own versions possibly?

Seems like maybe I should wrap my head around a bit more before trying to contribute anything of actual value :)

drmmarsunited commented 4 years ago

I actually went ahead and took a crack at this anyway, after doing more homework last night. Happy to take feedback on the PR.

drmmarsunited commented 4 years ago

@kddejong This was the issue tracked along with the PR that was just merged, in the event you want to close it off.