Merge PR #4064: Remove dep/vendor from documentation and version cmd
* Remove `dep` and `vendor` from documentation * Replace vendor with go.sum hash in version command
This commit is contained in:
parent
cec3065a36
commit
9e7440a92c
|
@ -0,0 +1 @@
|
||||||
|
#4064 Remove `dep` and `vendor` from `doc` and `version`.
|
6
Makefile
6
Makefile
|
@ -48,7 +48,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
|
||||||
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags)"
|
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags)"
|
||||||
|
|
||||||
ifneq ($(GOSUM),)
|
ifneq ($(GOSUM),)
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/version.VendorDirHash=$(shell $(GOSUM) go.sum)
|
ldflags += -X github.com/cosmos/cosmos-sdk/version.GoSumHash=$(shell $(GOSUM) go.sum)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(WITH_CLEVELDB),yes)
|
ifeq ($(WITH_CLEVELDB),yes)
|
||||||
|
@ -121,8 +121,6 @@ draw_deps: tools
|
||||||
clean:
|
clean:
|
||||||
rm -rf snapcraft-local.yaml build/
|
rm -rf snapcraft-local.yaml build/
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
rm -rf vendor/
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
### Documentation
|
### Documentation
|
||||||
|
@ -264,7 +262,7 @@ snapcraft-local.yaml: snapcraft-local.yaml.in
|
||||||
# To avoid unintended conflicts with file names, always add to .PHONY
|
# To avoid unintended conflicts with file names, always add to .PHONY
|
||||||
# unless there is a reason not to.
|
# unless there is a reason not to.
|
||||||
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
||||||
.PHONY: install install_debug dist clean distclean \
|
.PHONY: install install_debug dist clean \
|
||||||
draw_deps test test_cli test_unit \
|
draw_deps test test_cli test_unit \
|
||||||
test_cover lint benchmark devdoc_init devdoc devdoc_save devdoc_update \
|
test_cover lint benchmark devdoc_init devdoc devdoc_save devdoc_update \
|
||||||
build-linux build-docker-gaiadnode localnet-start localnet-stop \
|
build-linux build-docker-gaiadnode localnet-start localnet-stop \
|
||||||
|
|
|
@ -7,7 +7,6 @@ Once you have finallized your application, install it using `go get`. The follow
|
||||||
```bash
|
```bash
|
||||||
go get github.com/<your_username>/cosmos-sdk
|
go get github.com/<your_username>/cosmos-sdk
|
||||||
cd $GOPATH/src/github.com/<your_username>/cosmos-sdk
|
cd $GOPATH/src/github.com/<your_username>/cosmos-sdk
|
||||||
make get_vendor_deps
|
|
||||||
make install
|
make install
|
||||||
make install_examples
|
make install_examples
|
||||||
```
|
```
|
||||||
|
|
|
@ -51,7 +51,7 @@ $ gaiacli version --long
|
||||||
```
|
```
|
||||||
cosmos-sdk: 0.33.0
|
cosmos-sdk: 0.33.0
|
||||||
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
|
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
|
||||||
vendor hash: 5db0df3e24cf10545c84f462a24ddc61882aa58f
|
go.sum hash: d156153bd5e128fec3868eca9a1397a63a864edb5cfa0ac486db1b574b8eecfe
|
||||||
build tags: netgo ledger
|
build tags: netgo ledger
|
||||||
go version go1.12 linux/amd64
|
go version go1.12 linux/amd64
|
||||||
```
|
```
|
||||||
|
|
|
@ -49,7 +49,7 @@ $ gaiacli version --long
|
||||||
```
|
```
|
||||||
cosmos-sdk: 0.33.0
|
cosmos-sdk: 0.33.0
|
||||||
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
|
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
|
||||||
vendor hash: 5db0df3e24cf10545c84f462a24ddc61882aa58f
|
go.sum hash: d156153bd5e128fec3868eca9a1397a63a864edb5cfa0ac486db1b574b8eecfe
|
||||||
build tags: netgo ledger
|
build tags: netgo ledger
|
||||||
go version go1.12 linux/amd64
|
go version go1.12 linux/amd64
|
||||||
```
|
```
|
||||||
|
|
|
@ -32,7 +32,6 @@ cd $GOPATH/src/$REPO
|
||||||
# build & install master
|
# build & install master
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
LEDGER_ENABLED=false make tools
|
LEDGER_ENABLED=false make tools
|
||||||
LEDGER_ENABLED=false make get_vendor_deps
|
|
||||||
LEDGER_ENABLED=false make install
|
LEDGER_ENABLED=false make install
|
||||||
|
|
||||||
source ~/.profile
|
source ~/.profile
|
||||||
|
|
|
@ -48,6 +48,5 @@ cd $GOPATH/src/$REPO
|
||||||
# build & install master
|
# build & install master
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
gmake tools
|
gmake tools
|
||||||
gmake get_vendor_deps
|
|
||||||
gmake install
|
gmake install
|
||||||
gmake install_examples
|
gmake install_examples
|
||||||
|
|
|
@ -35,7 +35,6 @@ cd $GOPATH/src/$REPO
|
||||||
# build & install master
|
# build & install master
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
LEDGER_ENABLED=false make tools
|
LEDGER_ENABLED=false make tools
|
||||||
LEDGER_ENABLED=false make get_vendor_deps
|
|
||||||
LEDGER_ENABLED=false make install
|
LEDGER_ENABLED=false make install
|
||||||
|
|
||||||
source ~/.profile
|
source ~/.profile
|
||||||
|
|
|
@ -10,14 +10,14 @@ import (
|
||||||
var (
|
var (
|
||||||
Commit = ""
|
Commit = ""
|
||||||
Version = ""
|
Version = ""
|
||||||
VendorDirHash = ""
|
GoSumHash = ""
|
||||||
BuildTags = ""
|
BuildTags = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
type versionInfo struct {
|
type versionInfo struct {
|
||||||
CosmosSDK string `json:"cosmos_sdk"`
|
CosmosSDK string `json:"cosmos_sdk"`
|
||||||
GitCommit string `json:"commit"`
|
GitCommit string `json:"commit"`
|
||||||
VendorDirHash string `json:"vendor_hash"`
|
GoSumHash string `json:"gosum_hash"`
|
||||||
BuildTags string `json:"build_tags"`
|
BuildTags string `json:"build_tags"`
|
||||||
GoVersion string `json:"go"`
|
GoVersion string `json:"go"`
|
||||||
}
|
}
|
||||||
|
@ -25,16 +25,16 @@ type versionInfo struct {
|
||||||
func (v versionInfo) String() string {
|
func (v versionInfo) String() string {
|
||||||
return fmt.Sprintf(`cosmos-sdk: %s
|
return fmt.Sprintf(`cosmos-sdk: %s
|
||||||
git commit: %s
|
git commit: %s
|
||||||
vendor hash: %s
|
go.sum hash: %s
|
||||||
build tags: %s
|
build tags: %s
|
||||||
%s`, v.CosmosSDK, v.GitCommit, v.VendorDirHash, v.BuildTags, v.GoVersion)
|
%s`, v.CosmosSDK, v.GitCommit, v.GoSumHash, v.BuildTags, v.GoVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
func newVersionInfo() versionInfo {
|
func newVersionInfo() versionInfo {
|
||||||
return versionInfo{
|
return versionInfo{
|
||||||
Version,
|
Version,
|
||||||
Commit,
|
Commit,
|
||||||
VendorDirHash,
|
GoSumHash,
|
||||||
BuildTags,
|
BuildTags,
|
||||||
fmt.Sprintf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)}
|
fmt.Sprintf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue