summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-06-27 12:29:13 -0400
committerJay V <[email protected]>2025-06-27 19:10:42 -0400
commit8e0ec6b037f157e1ed10e26982223ed61187854e (patch)
tree613444012459e49eb87d1c9a4f4ae34412314da7
parent6dc434cb8366917d439f395afeee387efbb0c325 (diff)
downloadopencode-8e0ec6b037f157e1ed10e26982223ed61187854e.tar.gz
opencode-8e0ec6b037f157e1ed10e26982223ed61187854e.zip
ci: aur
-rwxr-xr-xpackages/opencode/script/publish.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts
index 2b301080c..20571e44e 100755
--- a/packages/opencode/script/publish.ts
+++ b/packages/opencode/script/publish.ts
@@ -142,7 +142,7 @@ if (!snapshot) {
"# Maintainer: dax",
"# Maintainer: adam",
"",
- "pkgname='opencode-bin'",
+ "pkgname='${pkg}'",
`pkgver=${version.split("-")[0]}`,
"options=('!debug' '!strip')",
"pkgrel=1",
@@ -166,14 +166,17 @@ if (!snapshot) {
"",
].join("\n")
- await $`rm -rf ./dist/aur-opencode-bin`
-
- await $`git clone ssh://[email protected]/opencode-bin.git ./dist/aur-opencode-bin`
- await Bun.file("./dist/aur-opencode-bin/PKGBUILD").write(pkgbuild)
- await $`cd ./dist/aur-opencode-bin && makepkg --printsrcinfo > .SRCINFO`
- await $`cd ./dist/aur-opencode-bin && git add PKGBUILD .SRCINFO`
- await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`
- if (!dry) await $`cd ./dist/aur-opencode-bin && git push`
+ for (const pkg of ["opencode", "opencode-bin"]) {
+ await $`rm -rf ./dist/aur-${pkg}`
+ await $`git clone ssh://[email protected]/opencode-bin.git ./dist/aur-${pkg}`
+ await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(
+ pkgbuild.replace("${pkg}", pkg),
+ )
+ await $`cd ./dist/aur-${pkg} && makepkg --printsrcinfo > .SRCINFO`
+ await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO`
+ await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${version}"`
+ if (!dry) await $`cd ./dist/aur-${pkg} && git push`
+ }
// Homebrew formula
const homebrewFormula = [