You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$Q# add our bins to PATH so `go generate` can find them
550
534
$Q$(BIN_PATH) go generate $(if$(verbose),-v) ./...
551
535
$Q$(MAKE) --no-print-directory fmt
552
-
# $Q echo "updating copyright headers"
553
-
# $Q $(MAKE) --no-print-directory copyright
554
536
555
537
release: ## Re-generate generated code and run tests
556
538
$(MAKE) --no-print-directory go-generate
@@ -569,15 +551,21 @@ build: ## `go build` all packages and tests (a quick compile check only, skips a
569
551
$Qcd cmd/server; go test -exec /usr/bin/true ./... >/dev/null
570
552
571
553
tidy: ## `go mod tidy` all packages
572
-
$Q# tidy in dependency order
554
+
$Q# tidy needs to run in dependency order:
555
+
$Q# everything depends on the main module, server depends on everything else so it should be last.
556
+
$Q# but we can just tidy everything 2x, which should be stable as our dependency tree is only 2 deep.
573
557
$Q go mod tidy
574
-
$Qcd common/archiver/gcloud; go mod tidy || (echo "failed to tidy gcloud plugin, try manually copying go.mod contents into common/archiver/gcloud/go.mod and rerunning">&2;exit 1)
575
-
$Qcd cmd/server; go mod tidy || (echo "failed to tidy main server module, try manually copying go.mod and common/archiver/gcloud/go.mod contents into cmd/server/go.mod and rerunning">&2;exit 1)
558
+
$Q$(foreach sub,$(SUBMODULE_PATHS), \
559
+
$Qcd$(sub); go mod tidy ||$$(>&2 echo "failed to tidy $(sub) plugin, try manually copying go.mod contents into $(sub)/go.mod and rerunning by hand"; exit 1)$(NEWLINE)\
560
+
)
561
+
$Q$(foreach sub,$(SUBMODULE_PATHS), \
562
+
$Qcd$(sub); go mod tidy ||$$(>&2 echo "failed to tidy $(sub) plugin, try manually copying go.mod contents into $(sub)/go.mod and rerunning by hand"; exit 1)$(NEWLINE)\
563
+
)
576
564
577
565
clean: ## Clean build products and SQLite database
578
566
rm -f $(BINS)
579
567
rm -Rf $(BUILD)
580
-
rm *.db
568
+
rm -f *.db
581
569
$(if \
582
570
$(wildcard$(STABLE_BIN)/*), \
583
571
$(warning usually-stable build tools still exist, delete the $(STABLE_BIN) folder to rebuild them),)
0 commit comments