fix(void): use concrete release-download URL for xbps client registration
Replace the self-referential <repo-url-from-release-notes> placeholder in the root README, the release-notes template, and the Void packaging README with the concrete per-tag download prefix the build-xbps job attaches the signed repo to. Static docs default TAG to the current version; release.yml renders github.ref_name at publish time. Fixes #29
This commit is contained in:
@@ -298,7 +298,7 @@ jobs:
|
||||
```bash
|
||||
# as root (the files come from this release's assets):
|
||||
cp <fingerprint>.plist /var/db/xbps/keys/
|
||||
echo 'repository=<repo-url-from-release-notes>' > /etc/xbps.d/voculinux.conf
|
||||
echo 'repository=https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/' > /etc/xbps.d/voculinux.conf
|
||||
sudo xbps-install -Sy voculinux
|
||||
```
|
||||
Answer `Y` at the fingerprint prompt only after checking it
|
||||
|
||||
@@ -250,7 +250,8 @@ templates in `packaging/void/srcpkgs/`. Details: [packaging/void/README.md](pack
|
||||
```bash
|
||||
# as root on the Void system (the files come from the release assets):
|
||||
cp <fingerprint>.plist /var/db/xbps/keys/
|
||||
echo 'repository=<repo-url-from-release-notes>' > /etc/xbps.d/voculinux.conf
|
||||
TAG=v0.18.5 # match the release you install from
|
||||
echo "repository=https://github.com/VocaHQ/vocalinux/releases/download/${TAG}/" > /etc/xbps.d/voculinux.conf
|
||||
```
|
||||
|
||||
Prefer the release notes for the exact repository URL. On first sync,
|
||||
|
||||
@@ -172,7 +172,8 @@ openssl genrsa -out xbps-sign-key.pem 4096
|
||||
```sh
|
||||
# as root on the Void system (the release notes carry the repo URL):
|
||||
cp <fingerprint>.plist /var/db/xbps/keys/
|
||||
echo 'repository=<repo-url-from-release-notes>' > /etc/xbps.d/voculinux.conf
|
||||
TAG=v0.18.5 # match the release you install from
|
||||
echo "repository=https://github.com/VocaHQ/vocalinux/releases/download/${TAG}/" > /etc/xbps.d/voculinux.conf
|
||||
xbps-install -Sy voculinux
|
||||
```
|
||||
|
||||
|
||||
@@ -266,6 +266,37 @@ def test_release_workflow_attaches_signed_repo_to_release() -> None:
|
||||
assert marker in text, f"the xbps job must attach {marker} to the release"
|
||||
|
||||
|
||||
#: Concrete release-download prefix every client snippet must name. The
|
||||
#: xbps job attaches the signed repo flat to the tag release with
|
||||
#: ``gh release upload "${{ github.ref_name }}"``, so the repository URL is
|
||||
#: the per-tag download prefix below.
|
||||
CONCRETE_REPO_DOWNLOAD = "https://github.com/VocaHQ/vocalinux/releases/download/"
|
||||
|
||||
|
||||
def test_client_registration_names_concrete_repo_url() -> None:
|
||||
"""No self-referential placeholder: every client snippet names the
|
||||
concrete release-download URL the xbps job attaches the repo to."""
|
||||
workflow = _release_workflow_text()
|
||||
root = ROOT_README.read_text(encoding="utf-8")
|
||||
void_readme = README.read_text(encoding="utf-8")
|
||||
for name, text in (
|
||||
("release.yml", workflow),
|
||||
("README.md", root),
|
||||
("packaging/void/README.md", void_readme),
|
||||
):
|
||||
assert (
|
||||
"<repo-url-from-release-notes>" not in text
|
||||
), f"{name} still carries the self-referential repo-URL placeholder"
|
||||
assert "repository=<" not in text, f"{name} still carries a placeholder repository URL"
|
||||
assert CONCRETE_REPO_DOWNLOAD in root, "root README must name the concrete release download URL"
|
||||
assert (
|
||||
CONCRETE_REPO_DOWNLOAD in void_readme
|
||||
), "void README must name the concrete release download URL"
|
||||
assert (
|
||||
"releases/download/${{ github.ref_name }}" in workflow
|
||||
), "release.yml must render the concrete per-tag download URL at publish time"
|
||||
|
||||
|
||||
def test_root_readme_registers_the_void_repo() -> None:
|
||||
"""Root README: Void install from the signed repo, not just the track README."""
|
||||
text = ROOT_README.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user