Update to v0.5.21

This commit is contained in:
Dax Raad
2025-08-24 18:43:38 -04:00
parent 4c6dd2a804
commit c9b4f0079b
2 changed files with 20 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
# Maintainer: adam
pkgname='opencode'
pkgver=0.4.29
pkgver=0.5.21
options=('!debug' '!strip')
pkgrel=1
pkgdesc='The AI coding agent built for the terminal.'
@@ -10,15 +10,22 @@ url='https://github.com/sst/opencode'
arch=('aarch64' 'x86_64')
license=('MIT')
provides=('opencode')
conflicts=('opencode')
conflicts=('opencode-bin')
depends=('fzf' 'ripgrep')
makedepends=('git' 'bun-bin' 'go')
source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-arm64.zip")
sha256sums_aarch64=('f74be1d68c7a0c7e50f4670b6fb63c9351f2a9c54416fdf3a1e1c05cf436daca')
source=("opencode-${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v0.5.21.tar.gz")
sha256sums=('SKIP')
source_x86_64=("${pkgname}_${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-x64.zip")
sha256sums_x86_64=('1a9d12906d4a595b2c0fa49ed14824e00d6cdd01f7f477d9c9b4d0c09968ee62')
build() {
cd "opencode-${pkgver}"
cd packages/tui
CGO_ENABLED=0 go build -ldflags="-s -w -X main.Version=${pkgver}" -o tui cmd/opencode/main.go
cd ../opencode
bun build --define OPENCODE_TUI_PATH="'../tui/tui'" --define OPENCODE_VERSION="'${pkgver}'" --compile --target=bun-linux-x64 --outfile=opencode ./src/index.ts
}
package() {
cd "opencode-${pkgver}/packages/opencode"
install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"
}