This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new a880eb4 Fix download commands
a880eb4 is described below
commit a880eb408bcabc84d9d980d46c1da3cd24509add
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jul 29 18:35:06 2025 +0100
Fix download commands
---
atr/routes/compose.py | 3 ++-
atr/routes/download.py | 3 ++-
atr/routes/finish.py | 3 ++-
atr/routes/upload.py | 3 ++-
atr/templates/download-all.html | 4 ++--
5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/atr/routes/compose.py b/atr/routes/compose.py
index 91c0eb8..e5c3432 100644
--- a/atr/routes/compose.py
+++ b/atr/routes/compose.py
@@ -96,7 +96,8 @@ async def check(
delete_form=delete_draft_form,
delete_file_form=delete_file_form,
asf_id=session.uid,
- server_domain=session.app_host,
+ server_domain=session.app_host.split(":", 1)[0],
+ server_host=session.app_host,
user_ssh_keys=user_ssh_keys,
format_datetime=util.format_datetime,
models=sql,
diff --git a/atr/routes/download.py b/atr/routes/download.py
index 2eab2ac..efbc526 100644
--- a/atr/routes/download.py
+++ b/atr/routes/download.py
@@ -56,7 +56,8 @@ async def all_selected(
version_name=version_name,
release=release,
asf_id=session.uid,
- server_domain=session.app_host,
+ server_domain=session.app_host.split(":", 1)[0],
+ server_host=session.app_host,
user_ssh_keys=user_ssh_keys,
back_url=back_url,
get_release_stats=util.get_release_stats,
diff --git a/atr/routes/finish.py b/atr/routes/finish.py
index ffe33fb..682f0d3 100644
--- a/atr/routes/finish.py
+++ b/atr/routes/finish.py
@@ -184,7 +184,8 @@ async def selected(
return await template.render(
"finish-selected.html",
asf_id=session.uid,
- server_domain=session.app_host,
+ server_domain=session.app_host.split(":", 1)[0],
+ server_host=session.app_host,
release=release,
source_files=sorted(source_files_rel),
form=move_form,
diff --git a/atr/routes/upload.py b/atr/routes/upload.py
index e217618..506c571 100644
--- a/atr/routes/upload.py
+++ b/atr/routes/upload.py
@@ -112,7 +112,8 @@ async def selected(session: routes.CommitterSession,
project_name: str, version_
return await template.render(
"upload-selected.html",
asf_id=session.uid,
- server_domain=session.app_host,
+ server_domain=session.app_host.split(":", 1)[0],
+ server_host=session.app_host,
release=release,
project_name=project_name,
version_name=version_name,
diff --git a/atr/templates/download-all.html b/atr/templates/download-all.html
index 316dbb7..13346fa 100644
--- a/atr/templates/download-all.html
+++ b/atr/templates/download-all.html
@@ -99,7 +99,7 @@
<p>You can download all of the files in this release using curl with the
following command:</p>
<!-- TODO: Add a button to copy the command to the clipboard -->
<pre class="bg-light border rounded p-3 mb-3">
-curl{% if (server_domain == "localhost.apache.org") or
server_domain.startswith("localhost.apache.org:" %} --insecure{% endif %} -fsS
https://{{ server_domain }}{{ as_url(routes.download.sh_selected,
project_name=release.project.name, version_name=release.version) }} |{% if
server_domain == "localhost.apache.org" %} CURL_EXTRA=--insecure{% endif %} sh
+curl{% if server_domain == "localhost.apache.org" %} --insecure{% endif %}
-fsS https://{{ server_host }}{{ as_url(routes.download.sh_selected,
project_name=release.project.name, version_name=release.version) }} |{% if
server_domain == "localhost.apache.org" %} CURL_EXTRA=--insecure{% endif %} sh
</pre>
<p>
This downloads the files into the <em>current directory</em>. Ensure that
you create a new empty directory, and change to it, before running the command.
The script requires curl and a POSIX compliant version of sh. It works by
downloading a POSIX complaint shell script straight into your shell. You can of
course <a href="{{ as_url(routes.download.sh_selected,
project_name=release.project.name, version_name=release.version) }}">download
the script</a> and audit it before running it.
@@ -116,7 +116,7 @@ rsync -av -e 'ssh -p 2222' {{ asf_id }}@{{ server_domain
}}:/{{ release.project.
<h3 id="download-wget" class="mt-4">Using wget</h3>
<p>You can download all of the files in this release using wget with the
following command:</p>
<pre class="bg-light border rounded p-3 mb-3">
-wget -r -np -nH --cut-dirs=4 --default-page=.index.html{% if (server_domain ==
"localhost.apache.org") or server_domain.startswith("localhost.apache.org:") %}
--no-check-certificate{% endif %} https://{{ server_domain }}{{
as_url(routes.download.path_empty, project_name=release.project.name,
version_name=release.version) }}
+wget -r -np -nH --cut-dirs=4 --default-page=.index.html{% if server_domain ==
"localhost.apache.org" %} --no-check-certificate{% endif %} https://{{
server_host }}{{ as_url(routes.download.path_empty,
project_name=release.project.name, version_name=release.version) }}
</pre>
<p>
This downloads the files into the <em>current directory</em>. Ensure that
you create a new empty directory, and change to it, before running the command.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]