forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Fix clean-up of vendor (argoproj#4363)
Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
1 changed file
with
1 addition
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
export SHELL:=/bin/bash | ||
export SHELLOPTS:=$(if $(SHELLOPTS),$(SHELLOPTS):)pipefail:errexit | ||
|
||
# This means we only one shell, and therefore you can use `trap` to clean-up | ||
.ONESHELL: | ||
|
||
# https://stackoverflow.com/questions/4122831/disable-make-builtin-rules-and-variables-from-inside-the-make-file | ||
MAKEFLAGS += --no-builtin-rules | ||
.SUFFIXES: | ||
|
@@ -112,15 +109,13 @@ PROTO_BINARIES := $(GOPATH)/bin/protoc-gen-gogo $(GOPATH)/bin/protoc-gen-gogofas | |
|
||
# go_install,path | ||
define go_install | ||
trap 'rm -Rf vendor' EXIT | ||
[ -e vendor ] || go mod vendor | ||
go install -mod=vendor ./vendor/$(1) | ||
endef | ||
|
||
# protoc,my.proto | ||
define protoc | ||
# protoc $(1) | ||
trap 'rm -Rf vendor' EXIT | ||
[ -e vendor ] || go mod vendor | ||
protoc \ | ||
-I /usr/local/include \ | ||
|
@@ -274,6 +269,7 @@ codegen: \ | |
$(GOPATH)/bin/mockery | ||
# `go generate ./...` takes around 10s, so we only run on specific packages. | ||
go generate ./persist/sqldb ./pkg/apiclient/workflow ./server/auth ./server/auth/sso ./workflow/executor | ||
rm -Rf vendor | ||
|
||
$(GOPATH)/bin/mockery: | ||
./hack/recurl.sh dist/mockery.tar.gz https://github.com/vektra/mockery/releases/download/v1.1.1/mockery_1.1.1_$(shell uname -s)_$(shell uname -m).tar.gz | ||
|
@@ -311,7 +307,6 @@ $(GOPATH)/bin/goimports: | |
go get golang.org/x/tools/cmd/[email protected] | ||
|
||
pkg/apis/workflow/v1alpha1/generated.proto: $(GOPATH)/bin/go-to-protobuf $(PROTO_BINARIES) $(TYPES) | ||
trap 'rm -Rf vendor' EXIT | ||
[ -e vendor ] || go mod vendor | ||
${GOPATH}/bin/go-to-protobuf \ | ||
--go-header-file=./hack/custom-boilerplate.go.txt \ | ||
|