Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: enrich version command's output #3343

Merged
merged 11 commits into from
Jan 22, 2019

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Jan 22, 2019

Closes: #1894

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added entries in PENDING.md with issue #
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick early review; needs PENDING.md too.

Makefile Show resolved Hide resolved
version/command.go Outdated Show resolved Hide resolved
@alessio alessio changed the title WIP: enrich version command's output R4R: enrich version command's output Jan 22, 2019
@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #3343 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           develop   #3343   +/-   ##
=======================================
  Coverage     54.9%   54.9%           
=======================================
  Files          132     132           
  Lines         9680    9680           
=======================================
  Hits          5315    5315           
  Misses        4028    4028           
  Partials       337     337

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running this for the first time for me yields:

cat: vendor-deps: No such file or directory
cat: vendor-deps: No such file or directory
cat: vendor-deps: No such file or directory
cat: vendor-deps: No such file or directory
cat: vendor-deps: No such file or directory
go install -tags "netgo ledger" -ldflags "-X github.com/cosmos/cosmos-sdk/version.Version=0.29.1-98-gf4c84046 -X github.com/cosmos/cosmos-sdk/version.Commit=f4c8404607c94eb0feb6e182bce31b54f827d241 -X github.com/cosmos/cosmos-sdk/version.VendorDirHash=" ./cmd/gaia/cmd/gaiad
...

Then, gaiad version yields:

cosmos-sdk 0.29.1-98-gf4c84046
latest commit: f4c8404607c94eb0feb6e182bce31b54f827d241
vendor/ directory's hash:
go version go1.11 darwin/amd64


* Gaia
* https://github.com/cosmos/cosmos-sdk/issues/2838 - Move store keys to constants
* [\#3162](https://github.com/cosmos/cosmos-sdk/issues/3162) The `--gas` flag now takes `auto` instead of `simulate`
in order to trigger a simulation of the tx before the actual execution.
* [\#3285](https://github.com/cosmos/cosmos-sdk/pull/3285) New `gaiad tendermint version` to print libs versions
* [\#1894](https://github.com/cosmos/cosmos-sdk/pull/1894) `version` command now shows latest commit, vendor dir hash, and build machine info.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this duplicate entry? I think the CLI will suffice.

version/command.go Outdated Show resolved Hide resolved
version/command.go Outdated Show resolved Hide resolved
version/command.go Outdated Show resolved Hide resolved
fmt.Println("cosmos-sdk", GetVersion())
fmt.Println("latest commit:", Commit)
fmt.Println("vendor/ directory's hash:", VendorDirHash)
fmt.Printf("go version %s %s/%s\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fmt.Printf("go version %s %s/%s\n",
fmt.Printf("go version: %s %s/%s\n",

@jackzampolin
Copy link
Member

Maybe we also make the option to output this as JSON?

Copy link
Member

@greg-szabo greg-szabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming is fine with caveats, the reading of file content need to be changed.

Makefile Show resolved Hide resolved
Alessio Treglia and others added 4 commits January 22, 2019 18:26
@alessio
Copy link
Contributor Author

alessio commented Jan 22, 2019 via email

PENDING.md Outdated

* SDK
* [staking] \#2513 Validator power type from Dec -> Int
* [staking] \#3233 key and value now contain duplicate fields to simplify code
* [\#3064](https://github.com/cosmos/cosmos-sdk/issues/3064) Sanitize `sdk.Coin` denom. Coins denoms are now case insensitive, i.e. 100fooToken equals to 100FOOTOKEN.
* [\#3195](https://github.com/cosmos/cosmos-sdk/issues/3195) Allows custom configuration for syncable strategy
* [\#3242](https://github.com/cosmos/cosmos-sdk/issues/3242) Fix infinite gas
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict relics

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the cruft leftover. This should not affect the merge.

@cwgoes cwgoes merged commit bf59291 into develop Jan 22, 2019
@cwgoes cwgoes deleted the alessio/1894-version-returns-go-ver-and-vendor-hash branch January 22, 2019 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants