8787 rm -r "content/operate/kubernetes/${version_to_remove}"
8888 done
8989
90- cp -r "content/operate/kubernetes/${version}"/* content/operate/kubernetes/
91- rm -r "content/operate/kubernetes/${version}"
90+ # relrefs should not include version
91+ find "content/operate/kubernetes/${version}" -type f | while read file; do
92+ awk '{gsub(/\(\{\{< relref "\/operate\/kubernetes\/'${version}'/, "({{< relref \"/operate/kubernetes") }1' "$file" > tmpfile && mv tmpfile "$file"
93+ done
94+
95+ rsync -a --delete-after "content/operate/kubernetes/${version}"/ content/operate/kubernetes/
9296 sed -i 's/id="versionSelectorKubernetesValue" class="version-selector-control">latest/id="versionSelectorKubernetesValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
9397 sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis for Kubernetes/' content/operate/kubernetes/_index.md
9498
@@ -110,8 +114,12 @@ jobs:
110114 rm -r "content/operate/rs/${version_to_remove}"
111115 done
112116
113- cp -r "content/operate/rs/${version}"/* content/operate/rs/
114- rm -r "content/operate/rs/${version}"
117+ # relrefs should not include version
118+ find "content/operate/rs/${version}" -type f | while read file; do
119+ awk '{gsub(/\(\{\{< relref "\/operate\/rs\/'${version}'/, "({{< relref \"/operate/rs") }1' "$file" > tmpfile && mv tmpfile "$file"
120+ done
121+
122+ rsync -a --delete-after "content/operate/rs/${version}"/ content/operate/rs/
115123 sed -i 's/id="versionSelectorRsValue" class="version-selector-control">latest/id="versionSelectorRsValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
116124 sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Software/' content/operate/rs/_index.md
117125
@@ -133,8 +141,12 @@ jobs:
133141 rm -r "content/integrate/redis-data-integration/${version_to_remove}"
134142 done
135143
136- cp -r "content/integrate/redis-data-integration/${version}"/* content/integrate/redis-data-integration/
137- rm -r "content/integrate/redis-data-integration/${version}"
144+ # relrefs should not include version
145+ find "content/operate/redis-data-integration/${version}" -type f | while read file; do
146+ awk '{gsub(/\(\{\{< relref "\/operate\/redis-data-integration\/'${version}'/, "({{< relref \"/operate/redis-data-integration") }1' "$file" > tmpfile && mv tmpfile "$file"
147+ done
148+
149+ rsync -a --delete-after "content/operate/redis-data-integration/${version}"/ content/operate/redis-data-integration/
138150 sed -i 's/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">latest/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
139151 sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Data Integration/' content/integrate/redis-data-integration/_index.md
140152
@@ -181,9 +193,9 @@ jobs:
181193 for versioned_build in "${versioned_builds[@]}"; do
182194 product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
183195 if [[ "${product}" == "redis-data-integration" ]]; then
184- gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
196+ gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/ " "gs://${BUCKET}/${bucket_path }/${versioned_build}/integrate/${product}"
185197 else
186- gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
198+ gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/ " "gs://${BUCKET}/${bucket_path }/${versioned_build}/operate/${product}"
187199 fi
188200 done
189201
0 commit comments