Skip to content

Commit

Permalink
[DFI-908,DFI-910] Cosmos SDK version fix, Swagger update (#225)
Browse files Browse the repository at this point in the history
* [DFI-908,DFI-910] Cosmos SDK version fix (simulator updated), auto Cosmos SDK version fetch for Swagger build, Swagger updated

* Fix for running local tests on OS X
  • Loading branch information
Mikhail Kornilov authored Oct 20, 2020
1 parent 8d68e58 commit 7fa4581
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cosmos_dir=$(swagger_dir)/cosmos-sdk
dnode = ./cmd/dnode
dncli =./cmd/dncli

cosmos_version = dfinance/launchpad
cosmos_version = $(shell awk '/replace github.com\/cosmos\/cosmos-sdk => github.com\/dfinance\/cosmos-sdk/ {print $$NF}' < go.mod)

all: install
install: go.sum install-dnode install-dncli
Expand Down Expand Up @@ -51,17 +51,17 @@ go.sum: go.mod
GO111MODULE=on go mod verify

swagger-ui-deps:
@echo "--> Preparing deps fro building Swagger API specificaion"
@echo "--> Preparing deps for building Swagger API specificaion"

@echo "-> Make tmp build folder"
rm -rf $(swagger_dir)
mkdir -p $(cosmos_dir)

@echo "-> Cosmos-SDK $(cosmos_version) checkout"
git -C $(swagger_dir) clone --branch $(cosmos_version) https://github.com/dfinance/cosmos-sdk.git
git -C $(swagger_dir) clone --depth 1 --branch $(cosmos_version) https://github.com/dfinance/cosmos-sdk.git

@echo "-> Fetching Golang libraries: swag, statik"
go get -u github.com/swaggo/swag/cmd/swag
go get -u github.com/swaggo/swag/cmd/swag@v1.6.7
go get github.com/g3co/go-swagger-merger

swagger-ui-build:
Expand Down
59 changes: 46 additions & 13 deletions cmd/dncli/docs/swagger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ module github.com/dfinance/dnode

go 1.14

replace github.com/cosmos/cosmos-sdk => github.com/dfinance/cosmos-sdk v0.38.4-0.20201013133805-612a04d62955
replace github.com/cosmos/cosmos-sdk => github.com/dfinance/cosmos-sdk v0.39.1-0.1

// Local development option
//replace github.com/cosmos/cosmos-sdk => /Users/boris/go/src/github.com/dfinance/cosmos-sdk
//replace github.com/cosmos/cosmos-sdk => /Users/tiky/Go_Projects/src/github.com/dfinance/cosmos-sdk

// Fix of OS X hostmachine test runs
// Source: https://github.com/ory/dockertest/issues/208
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6

require (
github.com/99designs/keyring v1.1.3
github.com/OneOfOne/xxhash v1.2.7
Expand All @@ -18,21 +22,26 @@ require (
github.com/dfinance/glav v0.0.0-20200814081332-c4701f6c12a6
github.com/dfinance/lcs v0.1.7-big
github.com/fsouza/go-dockerclient v1.6.6-0.20200910033347-214a51d9a1e5
github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09 // indirect
github.com/getsentry/sentry-go v0.5.1
github.com/ghodss/yaml v1.0.0
github.com/go-openapi/spec v0.19.9 // indirect
github.com/go-openapi/swag v0.19.9 // indirect
github.com/gin-gonic/gin v1.6.3 // indirect
github.com/go-openapi/spec v0.19.10 // indirect
github.com/go-openapi/swag v0.19.10 // indirect
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/gogo/protobuf v1.3.1
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.8.0
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kr/pty v1.1.5 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/olekukonko/tablewriter v0.0.4
github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 // indirect
github.com/pelletier/go-toml v1.6.0
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/shopspring/decimal v1.2.0
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v1.0.0
Expand All @@ -45,8 +54,6 @@ require (
github.com/tendermint/go-amino v0.15.1
github.com/tendermint/tendermint v0.33.7
github.com/tendermint/tm-db v0.5.1
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb // indirect
golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 // indirect
google.golang.org/grpc v1.30.0
google.golang.org/protobuf v1.24.0 // indirect
k8s.io/apimachinery v0.18.6 // indirect
Expand Down
Loading

0 comments on commit 7fa4581

Please sign in to comment.