Cosmos-sdk: cmd: version commands should give more info, but sometimes less info

Created on 31 Jul 2018  路  6Comments  路  Source: cosmos/cosmos-sdk

Version command should include more information:

  • OS info and version
  • Golang version
  • SDK commit hash
  • Vendor dir hash

Reason for the vendor dir hash is the git commit hash doesn't tell us if the binary was compiled with the right dependencies.

An alternative way to solve this vendor-dir-hash element that maybe we should start to consider is checking in the vendor directory.

CLI UX good first issue help wanted

Most helpful comment

I saw this coming. My fault, I shouldn't have break this ABI in the first place.
I will amend version command to: 1. show by default a short string 2. show extended info if --long flag is passed 3. implement JSON formatting

All 6 comments

Neat! I don't necessarily think we should commit vendor/ in. I think the hash is fine idea.

cc @alessio Thoughts on this?

Reasonable - although a bit unsure about vendor/ hashing. We should ship the vendor dir along with our release tarballs. I can work on this

Could we re-introduce a short output version of this? (perhaps using a --short flag)

We're using it to label (and tag) cloud instances like "${GAIA_VERSION} / ${CHAIN_ID} / ..." so would be nice to keep this capability.

A picture is worth a 1000 words :-)

image

.. alternatively, as suggested by @jackzampolin introduce a --output json option so this is easier to extract.

I saw this coming. My fault, I shouldn't have break this ABI in the first place.
I will amend version command to: 1. show by default a short string 2. show extended info if --long flag is passed 3. implement JSON formatting

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fedekunze picture fedekunze  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

hendrikhofstadt picture hendrikhofstadt  路  3Comments

mossid picture mossid  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments