Skip to content

Commit 6f0c079

Browse files
authored
Makefile: run 'go mod tidy' before 'go mod vendor' (#2726)
## Changes - Modify 'make' to first run 'go mod tidy', then 'go mod vendor'. - Modify 'make build' to also run 'go mod tidy' before 'go mod vendor'. ## Why It's a better sequence: 'go mod tidy' cleans up go.mod and go.sum and 'go mod vendor' populates vendor/ based on those. I also had errors when 'vendor' could not be run until 'tidy' is run.
1 parent a8d51ad commit 6f0c079

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
default: vendor fmt lint tidy ws
1+
default: tidy vendor fmt lint ws
22

33
PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... .
44

@@ -40,7 +40,7 @@ showcover:
4040
acc-showcover:
4141
go tool cover -html=coverage-acceptance.txt
4242

43-
build: vendor
43+
build: tidy vendor
4444
go build -mod vendor
4545

4646
snapshot:

0 commit comments

Comments
 (0)