From 734b6287b8be765b23d02cf342e2f506182a2266 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Tue, 5 Nov 2019 09:25:46 -0600 Subject: [PATCH] build: prevent 'make tools' from editing go.mod and go.sum (#6738) --- .gitignore | 1 + GNUmakefile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c1161c27bc..f47994d2b2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .DS_Store .fseventsd .envrc +.gotools .vagrant/ .idea/ /pkg diff --git a/GNUmakefile b/GNUmakefile index e24e30d4f9..6e7ea22cc4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -330,7 +330,11 @@ static-assets: ui: ui-docker static-assets-docker 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: @echo -n "Version: "