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

Add version cmd to get build and version info for Kuchain #35

Merged

Conversation

aquarius-kuchain
Copy link
Contributor

@aquarius-kuchain aquarius-kuchain commented Aug 19, 2020

Summary

Add version cmd to get build and version info for Kuchain.

Introduction

We need get version info by kucd, so it can make us to use current version.

./build/kucd version -h     
Print kuchain version numbers
against which this app has been compiled.

Usage:
  kucd version [flags]

Flags:
  -h, --help     help for version
  -j, --json     print version info by json
  -s, --simple   if just print simple version of kucd

we can use -s to get a simple version info:

./build/kucd version -s
0.3.2-rc

or get all infos in yaml or json:

./build/kucd version   
name: kuchain
tendermint_version: 0.33.6
abci: 0.16.2
block_protocol: 10
p2p_protocol: 7
version: 0.3.2-rc
branch: features/get-version
build_time: 2020-08-19 03:39.27
sdk_version: github.com/cosmos/[email protected]
commit: 333ca3721dc045944d9d61ee1ba6dca301b8dd31
build_tags: netgo,ledger

./build/kucd version -j | jq
{
  "name": "kuchain",
  "tendermint_version": "0.33.6",
  "abci": "0.16.2",
  "block_protocol": 10,
  "p2p_protocol": 7,
  "version": "0.3.2-rc",
  "branch": "features/get-version",
  "build_time": "2020-08-19 03:39.27",
  "sdk_version": "github.com/cosmos/[email protected]",
  "commit": "333ca3721dc045944d9d61ee1ba6dca301b8dd31",
  "build_tags": "netgo,ledger"
}

Modifys

  • Add Build Infos in Makefiles
  • Add Version cmd in kucd

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch
  • Linked to Github issue with discussion.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@aquarius-kuchain aquarius-kuchain self-assigned this Aug 19, 2020
@aquarius-kuchain aquarius-kuchain merged commit 287b3b2 into KuChainNetwork:develop Aug 19, 2020
@aquarius-kuchain aquarius-kuchain deleted the features/get-version branch August 27, 2020 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant