Skip to content

Commit 25724cc

Browse files
committed
add update-hash to tidy
1 parent 7063cda commit 25724cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

devbox.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"packages": {
55
"go": "latest",
66
"runx:golangci/golangci-lint": "latest",
7-
"runx:mvdan/gofumpt": "latest",
7+
"runx:mvdan/gofumpt": "latest"
88
},
99
"env": {
1010
"GOENV": "off",
@@ -38,18 +38,18 @@
3838
"test": "go test -race -cover ./...",
3939
"test-projects-only": "DEVBOX_RUN_PROJECT_TESTS=1 go test -v -timeout ${DEVBOX_GOLANG_TEST_TIMEOUT:-30m} ./... -run \"TestExamples|TestScriptsWithProjects\"",
4040
"update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go",
41-
// Updates the Flake's vendorHash: First run `go mod vendor` to vendor
41+
// Updates the Flake's vendorHash: First run `go mod vendor` to vendor
4242
// the dependencies, then hash the vendor directory with Nix.
4343
// The hash is saved to the `vendor-hash` file, which is then
4444
// read into the Nix Flake.
4545
"update-hash": [
4646
"go mod vendor",
4747
"hash=$(nix hash path vendor)",
4848
"echo \"$hash\" > vendor-hash",
49-
"rm -rf vendor"
49+
"rm -rf vendor",
50+
"echo \"Vendor Hash: $hash\""
5051
],
51-
"tidy": "go mod tidy",
52-
52+
"tidy": ["go mod tidy", "devbox run update-hash"],
5353
// docker-testscripts runs the testscripts with Docker to exercise
5454
// Linux-specific tests. It invokes the test binary directly, so any extra
5555
// test runner flags must have their "-test." prefix.

0 commit comments

Comments
 (0)