Run go mod tidy before go mod vendor

With the previous order, `go mod vendor` populated vendor/ from the
current go.mod, and only then did `go mod tidy` prune it. If tidy
changed go.mod, vendor/ was left matching the pre-tidy state, so a
single run could leave vendor/modules.txt inconsistent with go.mod
(it took a second run to converge). Tidying first settles
go.mod/go.sum, then vendor rebuilds vendor/ to match in one pass.

This applies both to the `vendor` recipe (justfile and Makefile)
and to scripts/bump_lazycore.sh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Haller
2026-07-02 11:16:53 +02:00
co-authored by Claude Opus 4.8
parent 8af6104454
commit 4b082ed096
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Go's proxy servers are not very up-to-date so that's why we use `GOPROXY=direct`
# We specify the `awesome` branch to avoid the default behaviour of looking for a semver tag.
GOPROXY=direct go get -u github.com/jesseduffield/lazycore@master && go mod vendor && go mod tidy
GOPROXY=direct go get -u github.com/jesseduffield/lazycore@master && go mod tidy && go mod vendor
# Note to self if you ever want to fork a repo be sure to use this same approach: it's important to use the branch name (e.g. master)