diff --git a/Makefile b/Makefile index 8c3d37147b..1a7d7314ae 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ export GO_TEST=env GOTRACEBACK=all GO111MODULE=on go test $(GO_ARGS) # Do not add GO111MODULE=on to the call to go generate so it doesn't pollute the environment. export GO_GENERATE=go generate $(GO_ARGS) export GO_VET=env GO111MODULE=on go vet $(GO_ARGS) +export GO_RUN=env GO111MODULE=on go run $(GO_ARGS) export PATH := $(PWD)/bin/$(GOOS):$(PATH) @@ -120,7 +121,7 @@ bench: build: all nightly: build - env GO111MODULE=on go run github.com/goreleaser/goreleaser --snapshot --rm-dist --publish-snapshots + $(GO_RUN) github.com/goreleaser/goreleaser --snapshot --rm-dist --publish-snapshots clean: @for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done diff --git a/http/Makefile b/http/Makefile index 3f041db143..b0af42299f 100644 --- a/http/Makefile +++ b/http/Makefile @@ -16,8 +16,11 @@ $(SUBDIRS): clean: $(SUBDIRS) rm -f $(TARGETS) + +GO_RUN := env GO111MODULE=on go run + ../ui/src/api/api.ts: $(SOURCES) - cat cur_swagger.yml | go run ../internal/yaml2json > openapi.json + cat cur_swagger.yml | $(GO_RUN) ../internal/yaml2json > openapi.json openapi-generator generate -g typescript-axios -o ../ui/src/api -i openapi.json rm openapi.json