You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/08/17 15:49:03 UTC
(tooling-trusted-releases) branch sbp updated: Make the SVN publication destination clear in beta
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new bcb9be5e Make the SVN publication destination clear in beta
bcb9be5e is described below
commit bcb9be5e9775133a4d2143cb3757078682630561
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Mon Aug 17 16:48:19 2026 +0100
Make the SVN publication destination clear in beta
---
atr/get/finish.py | 8 +++++++-
tests/unit/test_get_finish.py | 7 +++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/atr/get/finish.py b/atr/get/finish.py
index b696a668..b6e47ea0 100644
--- a/atr/get/finish.py
+++ b/atr/get/finish.py
@@ -424,7 +424,7 @@ async def _render_svn_publish(page: htm.Block, release: sql.Release) -> None:
"download_path_suffix": _svn_download_path_default(release),
"revision_number": release.latest_revision_number,
},
- submit_label="Publish to SVN",
+ submit_label=_svn_publish_label(),
)
@@ -464,6 +464,12 @@ def _svn_download_path_default(release: sql.Release) -> str:
return str(suffix) if suffix is not None else ""
+def _svn_publish_label() -> str:
+ if util.svn_publish_target() is util.SvnPublishTarget.RELEASE:
+ return "Publish to SVN dist/release"
+ return "Publish to SVN"
+
+
def _svn_publish_revision(completed: sql.Task) -> int | None:
result = completed.result
if isinstance(result, results.SvnPublish):
diff --git a/tests/unit/test_get_finish.py b/tests/unit/test_get_finish.py
index f268422a..2b85a0f1 100644
--- a/tests/unit/test_get_finish.py
+++ b/tests/unit/test_get_finish.py
@@ -27,3 +27,10 @@ def test_render_publish_step_omits_promotion_for_release_target(monkeypatch: pyt
assert "dist/release" in html
assert "dist/atr" not in html
assert "<a " not in html
+
+
+def test_svn_publish_label_names_release_target(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setattr(util, "svn_publish_target", lambda: util.SvnPublishTarget.RELEASE)
+ assert finish._svn_publish_label() == "Publish to SVN dist/release"
+ monkeypatch.setattr(util, "svn_publish_target", lambda: util.SvnPublishTarget.ATR)
+ assert finish._svn_publish_label() == "Publish to SVN"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org