build: prevent 'make tools' from editing go.mod and go.sum (#6738)

This commit is contained in:
R.B. Boyer 2019-11-05 09:25:46 -06:00 committed by GitHub
parent f7f1c3fa54
commit 734b6287b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
.DS_Store .DS_Store
.fseventsd .fseventsd
.envrc .envrc
.gotools
.vagrant/ .vagrant/
.idea/ .idea/
/pkg /pkg

View File

@ -330,7 +330,11 @@ static-assets:
ui: ui-docker static-assets-docker ui: ui-docker static-assets-docker
tools: tools:
go get -v $(GOTOOLS) @mkdir -p .gotools
@cd .gotools && if [[ ! -f go.mod ]]; then \
go mod init consul-tools ; \
fi
cd .gotools && go get -v $(GOTOOLS)
version: version:
@echo -n "Version: " @echo -n "Version: "