adnanhemani commented on code in PR #4626:
URL: https://github.com/apache/polaris/pull/4626#discussion_r3383962242
##########
.github/workflows/release-4-publish-release.yml:
##########
@@ -492,6 +492,59 @@ jobs:
✅ Nexus staging repository released
EOT
+ - name: Update previous release binary distribution URLs to archive
+ run: |
+ source "${LIBS_DIR}/_exec.sh"
+
+ # Use a temporary worktree to operate on the versioned-docs branch
without
+ # disturbing the current release-branch checkout.
+ versioned_docs_dir="${RUNNER_TEMP}/versioned-docs"
+ exec_process git fetch origin versioned-docs
+ exec_process git worktree add "${versioned_docs_dir}"
origin/versioned-docs
+
+ # Find all binary-distribution.md files in version directories,
+ # skip the directory for the version being released right now
+ # (its docs haven't been added to versioned-docs yet, but we exclude
+ # it explicitly for safety).
+ changed_files=()
+ while IFS= read -r -d '' file; do
+ # Derive the version from the first path component inside the
worktree
+ rel_path="${file#${versioned_docs_dir}/}"
+ version_dir="${rel_path%%/*}"
+ if [[ "${version_dir}" == "${version_without_rc}" ]]; then
+ continue
+ fi
+
+ # Replace both incubator and non-incubator downloads URLs with the
+ # archive equivalent, so old docs no longer point at the live CDN.
+ sed -i \
+ -e
's|https://downloads\.apache\.org/incubator/polaris/|https://archive.apache.org/dist/polaris/|g'
\
+ -e
's|https://downloads\.apache\.org/polaris/|https://archive.apache.org/dist/polaris/|g'
\
+ "${file}"
+
Review Comment:
You're correct - this was a miss on my part. Let me make this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]