File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
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 ?= release-1.26
@@ -153,7 +163,7 @@ netlify_install:
153
163
154
164
netlify : netlify_install
155
165
@scripts/gen_site.sh
156
- @scripts/build_site.sh " /latest "
166
+ @scripts/build_site.sh " ${NETLIFY_URL} "
157
167
@scripts/include_archive_site.sh
158
168
159
169
# ISTIO_API_GIT_SOURCE allows to override the default Istio API repository, https://github.com/istio/api@$(SOURCE_BRANCH_NAME)
You can’t perform that action at this time.
0 commit comments