The open source coding agent.
TypeScript
chore: use stable URLs in PKGBUILD (#3448)
Denys Rybalka5e886c35d59a
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.tsindex 3bdf6a49df0..ef35b8514f0 100755--- a/packages/opencode/script/publish.ts+++ b/packages/opencode/script/publish.ts@@ -51,13 +51,16 @@ if (!Script.preview) {const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim())const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim())+ const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2)+// archconst binaryPkgbuild = ["# Maintainer: dax","# Maintainer: adam","","pkgname='opencode-bin'",- `pkgver=${Script.version.split("-")[0]}`,+ `pkgver=${pkgver}`,+ `_subver=${_subver}`,"options=('!debug' '!strip')","pkgrel=1","pkgdesc='The AI coding agent built for the terminal.'",@@ -68,10 +71,10 @@ if (!Script.preview) {"conflicts=('opencode')","depends=('fzf' 'ripgrep')","",- `source_aarch64=("\${pkgname}_\${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v${Script.version}/opencode-linux-arm64.zip")`,+ `source_aarch64=("\${pkgname}_\${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-arm64.zip")`,`sha256sums_aarch64=('${arm64Sha}')`,"",- `source_x86_64=("\${pkgname}_\${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v${Script.version}/opencode-linux-x64.zip")`,+ `source_x86_64=("\${pkgname}_\${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-x64.zip")`,`sha256sums_x86_64=('${x64Sha}')`,"","package() {",@@ -86,7 +89,8 @@ if (!Script.preview) {"# Maintainer: adam","","pkgname='opencode'",- `pkgver=${Script.version.split("-")[0]}`,+ `pkgver=${pkgver}`,+ `_subver=${_subver}`,"options=('!debug' '!strip')","pkgrel=1","pkgdesc='The AI coding agent built for the terminal.'",@@ -98,7 +102,7 @@ if (!Script.preview) {"depends=('fzf' 'ripgrep')","makedepends=('git' 'bun-bin' 'go')","",- `source=("opencode-\${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v${Script.version}.tar.gz")`,+ `source=("opencode-\${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v\${pkgver}\${_subver}.tar.gz")`,`sha256sums=('SKIP')`,"","build() {",