From 7d4b9548acfe23df2385ec30ece548e674b2822b Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 18 May 2022 15:41:00 -0400 Subject: [PATCH] Makefile: use go install for install-gen-deps The `go get' command for installing a module without modifying the go.mod/go.sum was deprecated for several versions, and is now removed in go 1.18. Since the project supports go 1.17 at minimum, the behaviour is supported too, and we can change this in the Makefile so the build works on Go 1.18 too. --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1de8433dc..193dddc10 100644 --- a/Makefile +++ b/Makefile @@ -52,12 +52,7 @@ install-build-deps: ## Install dependencies for bin build @go install github.com/mitchellh/gox@v1.0.1 install-gen-deps: ## Install dependencies for code generation - # to avoid having to tidy our go deps, we `go get` our binaries from a temp - # dir. `go get` will change our deps and the following deps are not part of - # out code dependencies; so a go mod tidy will remove them again. `go - # install` seems to install the last tagged version and we want to install - # master. - @(cd $(TEMPDIR) && GO111MODULE=on go get github.com/alvaroloes/enumer@master) + @GO111MODULE=on go install github.com/alvaroloes/enumer@master @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest install-lint-deps: ## Install linter dependencies @@ -203,4 +198,4 @@ help: # This is used for release builds by .github/workflows/build.yml version: - @$(CURDIR)/scripts/version.sh version/version.go \ No newline at end of file + @$(CURDIR)/scripts/version.sh version/version.go