File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -462,8 +462,11 @@ else
462462release-ci : push-image push-manifest-list-latest
463463endif
464464
465- .PHONY : netlify
466- netlify : docs-clean docs-ci docs-build
465+ .PHONY : netlify-latest
466+ netlify-latest : docs-clean docs-ci docs-build-latest
467+
468+ .PHONY : netlify-edge
469+ netlify-edge : docs-clean docs-ci docs-build
467470
468471# Kept for compatibility. Use `make fuzz` instead.
469472.PHONY : check-fuzz
Original file line number Diff line number Diff line change 1414build :
1515 npx docusaurus build
1616
17+ .PHONY : build-latest
18+ build-latest :
19+ @if ! git diff --quiet HEAD -- || ! git diff --cached --quiet; then \
20+ echo " Latest release build must be done without working changes" ; \
21+ git status; \
22+ exit 1; \
23+ fi
24+ git fetch --tags origin
25+ $(eval CURRENT_REF := $(shell git rev-parse HEAD) )
26+ LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 ) && \
27+ [ -n " $LATEST_TAG " ] || (echo " No valid release tag found (expected format: v1.2.3)" && exit 1) && \
28+ git checkout $LATEST_TAG && \
29+ BUILD_VERSION=$LATEST_TAG npx docusaurus build && \
30+ git checkout $(CURRENT_REF )
31+
1732.PHONY : clean
1833clean :
1934 rm -rf build .docusaurus
Original file line number Diff line number Diff line change 11[build ]
22publish = " docs/build"
3- command = " make netlify"
3+ command = " make netlify-latest "
44edge_functions = " docs/functions"
55
66[build .environment ]
@@ -9,6 +9,9 @@ NODE_VERSION = "22.15.0"
99# secret scan
1010SECRETS_SCAN_OMIT_PATHS = " v1/test/cases,v1/topdown/crypto_test.go"
1111
12+ [context .deploy-preview ]
13+ command = " make netlify-latest"
14+
1215[[edge_functions ]]
1316# this path should not be changed as various external sites depend on it for OPA
1417# badges.
You can’t perform that action at this time.
0 commit comments