From f146678f43ae4cd6b2d7bc8b8cb570a7eb25285c Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Thu, 7 Dec 2023 11:12:39 -0600 Subject: [PATCH] ci: use go-modtool with config file (#19333) --- GNUmakefile | 7 ++----- ci/modtool.toml | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 ci/modtool.toml diff --git a/GNUmakefile b/GNUmakefile index db0613dd3..2117b9b9f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -140,7 +140,7 @@ deps: ## Install build and development dependencies go install github.com/hashicorp/go-changelog/cmd/changelog-build@latest go install golang.org/x/tools/cmd/stringer@v0.1.12 go install github.com/hashicorp/hc-install/cmd/hc-install@v0.6.1 - go install github.com/shoenig/go-modtool@v0.1.1 + go install github.com/shoenig/go-modtool@v0.2.0 .PHONY: lint-deps lint-deps: ## Install linter dependencies @@ -249,10 +249,7 @@ tidy: ## Tidy up the go mod files @cd tools && go mod tidy @cd api && go mod tidy @echo "==> Tidy nomad module" - @go-modtool \ - --replace-comment="Pinned dependencies are noted in github.com/hashicorp/nomad/issues/11826." \ - --subs-comment="Nomad is built using the current source of the API module." \ - -w fmt go.mod + @go-modtool -config=ci/modtool.toml fmt go.mod @go mod tidy .PHONY: dev diff --git a/ci/modtool.toml b/ci/modtool.toml new file mode 100644 index 000000000..2f278b2f9 --- /dev/null +++ b/ci/modtool.toml @@ -0,0 +1,3 @@ +ReplaceComment = "Pinned dependencies are noted in github.com/hashicorp/nomad/issues/11826." +SubmodulesComment = "Nomad is built using the current source of the API module." +WriteFile = true