File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,19 @@ JUNIT_REPORT := $(shell which go-junit-report 2> /dev/null || echo "${ISTIO_BIN}
72
72
ISTIO_SERVE_DOMAIN ?= localhost
73
73
export ISTIO_SERVE_DOMAIN
74
74
75
+ # Determine the base URL for the Netlify-hosted site depending on the Hugo context.
76
+ # 'production' context: Use site URL (istio.io, preliminary.istio.io or istio-staging.netlify.app)
77
+ # 'deploy-preview' context: Use per-build URL (deploy-preview-16568--preliminary-istio.netlify.app)
78
+ # any other context: use relative URLs
75
79
ifeq ($(CONTEXT ) ,production)
76
- baseurl := "$(URL ) "
80
+ NETLIFY_URL := $(URL ) /latest
81
+ else ifeq ($(CONTEXT),deploy-preview)
82
+ NETLIFY_URL := $(DEPLOY_PRIME_URL ) /latest
83
+ else
84
+ NETLIFY_URL := /latest
77
85
endif
86
+ export NETLIFY_URL
87
+
78
88
79
89
# Which branch of the Istio source code do we fetch stuff from
80
90
export SOURCE_BRANCH_NAME ?= master
@@ -146,7 +156,7 @@ netlify_install:
146
156
147
157
netlify : netlify_install
148
158
@scripts/gen_site.sh
149
- @scripts/build_site.sh " /latest "
159
+ @scripts/build_site.sh " ${NETLIFY_URL} "
150
160
@scripts/include_archive_site.sh
151
161
152
162
# ISTIO_API_GIT_SOURCE allows to override the default Istio API repository, https://github.com/istio/api@$(SOURCE_BRANCH_NAME)
Original file line number Diff line number Diff line change 21
21
22
22
[[edge_functions ]]
23
23
path = " /v*"
24
- function = " redirect-to-latest"
24
+ function = " redirect-to-latest"
You can’t perform that action at this time.
0 commit comments