@@ -6,6 +6,11 @@ DOCSDIR=docs
66help : # # Display available targets
77 @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | awk ' BEGIN {FS = ":.*?## "}; {printf " %-18s %s\n", $$1, $$2}'
88
9+ update-themes : # # Update theme submodules to their latest versions
10+ @echo " Updating theme submodules to latest..."
11+ @git submodule update --remote themes/presidium-styling-base themes/presidium-layouts-base themes/presidium-layouts-blog
12+ @echo " Theme submodules updated."
13+
914prepare-themes : # # Prepare themes for embedding (rename go.mod to make embeddable)
1015 @echo " Preparing themes for embedding..."
1116 @for theme in themes/presidium-* ; do \
@@ -33,17 +38,17 @@ restore-themes: ## Restore theme go.mod files to original names
3338 done
3439
3540build : prepare-themes # # Build the presidium binary
36- go build -tags extended -o $(FILENAME ) .
41+ go build -tags extended -o $(FILENAME ) . ; status= $$? ; $( MAKE ) restore-themes ; exit $$ status
3742
3843test : prepare-themes # # Run tests with coverage
3944 @mkdir -p reports
40- go test -race -timeout 120s ./... -coverprofile=reports/tests-cov.out
45+ go test -race -timeout 120s ./... -coverprofile=reports/tests-cov.out ; status= $$? ; $( MAKE ) restore-themes ; exit $$ status
4146
4247fmt : # # Format Go source files
4348 go fmt ./...
4449
4550vet : prepare-themes # # Run go vet
46- go vet ./...
51+ go vet ./... ; status= $$? ; $( MAKE ) restore-themes ; exit $$ status
4752
4853tidy : # # Tidy and verify module dependencies
4954 go mod tidy && go mod verify
@@ -55,13 +60,12 @@ coverage_report: ## Open coverage report in browser
5560 @go tool cover -html=reports/tests-cov.out
5661
5762dist : prepare-themes # # Build distribution binary
58- mkdir -p " dist"
59- go build -trimpath -o " dist/presidium" --tags extended
63+ mkdir -p " dist" && go build -trimpath -o " dist/presidium" --tags extended ; status=$$? ; $(MAKE ) restore-themes ; exit $$ status
6064
6165checks : clean tidy fmt vet lint test build
6266
6367serve-docs :
6468 cd $(DOCSDIR ) && make serve
6569
6670lint : prepare-themes # # Run golangci-lint
67- golangci-lint run --timeout 10m
71+ golangci-lint run --timeout 10m ; status= $$? ; $( MAKE ) restore-themes ; exit $$ status
0 commit comments