Skip to content

Commit

Permalink
build(codegen): install swagger codegen tools into local cache (#922)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian committed Nov 21, 2020
1 parent 5b366af commit e736183
Show file tree
Hide file tree
Showing 6 changed files with 9,104 additions and 3,342 deletions.
10 changes: 9 additions & 1 deletion Makefile
Expand Up @@ -15,6 +15,11 @@ CACHE := $(CACHE_BASE)
CACHE_BIN := $(CACHE)/bin
CACHE_INCLUDE := $(CACHE)/include
CACHE_VERSIONS := $(CACHE)/versions
CACHE_NODE_MODULES := $(CACHE)/node_modules
CACHE_NODE_BIN := $(CACHE_NODE_MODULES)/.bin

# setup .cache bins first in paths to have precedence over already installed same tools for system wide use
PATH := "$(PATH):$(CACHE_BIN):$(CACHE_NODE_BIN)"

BUF_VERSION ?= 0.25.0
PROTOC_VERSION ?= 3.13.0
Expand All @@ -30,6 +35,8 @@ PROTOC_VERSION_FILE = $(CACHE_VERSIONS)/protoc/$(PROTOC_VERSION)
GRPC_GATEWAY_VERSION_FILE = $(CACHE_VERSIONS)/protoc-gen-grpc-gateway/$(GRPC_GATEWAY_VERSION)
PROTOC_GEN_COSMOS_VERSION_FILE = $(CACHE_VERSIONS)/protoc-gen-cosmos/$(PROTOC_GEN_COSMOS_VERSION)
MODVENDOR = $(CACHE_BIN)/modvendor
SWAGGER_COMBINE = $(CACHE_NODE_BIN)/swagger-combine
PROTOC_SWAGGER_GEN := $(CACHE_BIN)/protoc-swagger-gen
PROTOC := $(CACHE_BIN)/protoc
PROTOC_GEN_COSMOS := $(CACHE_BIN)/protoc-gen-cosmos
GRPC_GATEWAY := $(CACHE_BIN)/protoc-gen-grpc-gateway
Expand All @@ -41,7 +48,8 @@ GOLANGCI_LINT = $(DOCKER_RUN) golangci/golangci-lint:$(GOLANGCI_LINT_VE
LINT = $(GOLANGCI_LINT) ./... --disable-all --deadline=5m --enable
TEST_DOCKER_REPO := jackzampolin/akashtest

GORELEASER_CONFIG=.goreleaser.yaml
GORELEASER_CONFIG = .goreleaser.yaml

# BUILD_TAGS are for builds withing this makefile
# GORELEASER_BUILD_TAGS are for goreleaser only
# Setting mainnet flag based on env value
Expand Down
6 changes: 3 additions & 3 deletions client/docs/config.json
Expand Up @@ -7,13 +7,13 @@
},
"apis": [
{
"url": "./tmp-swagger-gen/akash/deployment/v1beta1/query.swagger.json"
"url": "./.cache/tmp/swagger-gen/akash/deployment/v1beta1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/akash/market/v1beta1/query.swagger.json"
"url": "./.cache/tmp/swagger-gen/akash/market/v1beta1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/akash/provider/v1beta1/query.swagger.json"
"url": "./.cache/tmp/swagger-gen/akash/provider/v1beta1/query.swagger.json"
},
{
"url": "./vendor/github.com/cosmos/cosmos-sdk/client/docs/swagger-ui/swagger.yaml",
Expand Down

0 comments on commit e736183

Please sign in to comment.