[PR #3448] chore: use stable URLs in PKGBUILD #10653

Closed
opened 2026-02-16 18:15:22 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3448

State: closed
Merged: Yes


Currently, when opencode releases a new version (e.g., 1.2.3-beta.4), the PKGBUILD files embed the full version string directly in the source URLs.

When users update the package, they must verify the entire URL in the diff. This is tedious because the URL changes with every release, even though only the version number is different:

-pkgver=1.2.3
+pkgver=1.2.4

-source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v1.2.3-beta.4/opencode-linux-arm64.zip")
+source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v1.2.4-beta.5/opencode-linux-arm64.zip")

This PR introduces a _subver variable that separates the version prefix from the suffix:

-pkgver=1.2.3
-_subver=-beta.4
+pkgver=1.2.4
+_subver=-beta.5

Now the URL template is constant across all versions. Users only need to verify the pkgver and _subver variables change correctly, not the entire URL string.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3448 **State:** closed **Merged:** Yes --- Currently, when opencode releases a new version (e.g., 1.2.3-beta.4), the PKGBUILD files embed the full version string directly in the source URLs. When users update the package, they must verify the entire URL in the diff. This is tedious because the URL changes with every release, even though only the version number is different: ```diff -pkgver=1.2.3 +pkgver=1.2.4 -source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v1.2.3-beta.4/opencode-linux-arm64.zip") +source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v1.2.4-beta.5/opencode-linux-arm64.zip") ``` This PR introduces a `_subver` variable that separates the version prefix from the suffix: ```diff -pkgver=1.2.3 -_subver=-beta.4 +pkgver=1.2.4 +_subver=-beta.5 ``` Now the URL template is constant across all versions. Users only need to verify the `pkgver` and `_subver` variables change correctly, not the entire URL string.
yindo added the pull-request label 2026-02-16 18:15:22 -05:00
yindo closed this issue 2026-02-16 18:15:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10653