flyingImer commented on code in PR #4626:
URL: https://github.com/apache/polaris/pull/4626#discussion_r3382274554
##########
.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:
Should the incubator URL keep the `/dist/incubator/polaris/` archive path?
I tested a few actual artifact URLs, and the proposed rewrite would make
older incubating release links 404. For example:
-
`https://archive.apache.org/dist/incubator/polaris/1.0.0-incubating/polaris-bin-1.0.0-incubating.tgz`
returns 200, but `https://archive.apache.org/dist/polaris/1.0.0-incubating/`
returns 404.
- Same for `1.1.0-incubating` and `1.2.0-incubating`.
- `1.3.0-incubating` appears to exist in both archive paths.
So I think the incubator rewrite should probably target
`https://archive.apache.org/dist/incubator/polaris/`, while the non-incubator
rewrite should keep using `https://archive.apache.org/dist/polaris/`.
--
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]