mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-08 10:24:52 +01:00
ci: disable AUR packaging in publish workflow
This commit is contained in:
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@@ -48,10 +48,10 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Install makepkg
|
# - name: Install makepkg
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get install -y pacman-package-manager
|
# sudo apt-get install -y pacman-package-manager
|
||||||
|
|
||||||
- name: Setup SSH for AUR
|
- name: Setup SSH for AUR
|
||||||
run: |
|
run: |
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
git config --global user.email "opencode@sst.dev"
|
git config --global user.email "opencode@sst.dev"
|
||||||
git config --global user.name "opencode"
|
git config --global user.name "opencode"
|
||||||
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts
|
# ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
|
|
||||||
|
|||||||
@@ -97,45 +97,45 @@ if (!snapshot) {
|
|||||||
const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
|
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 macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
|
||||||
|
|
||||||
// AUR package
|
// // AUR package
|
||||||
const pkgbuild = [
|
// const pkgbuild = [
|
||||||
"# Maintainer: dax",
|
// "# Maintainer: dax",
|
||||||
"# Maintainer: adam",
|
// "# Maintainer: adam",
|
||||||
"",
|
// "",
|
||||||
"pkgname='${pkg}'",
|
// "pkgname='${pkg}'",
|
||||||
`pkgver=${version.split("-")[0]}`,
|
// `pkgver=${version.split("-")[0]}`,
|
||||||
"options=('!debug' '!strip')",
|
// "options=('!debug' '!strip')",
|
||||||
"pkgrel=1",
|
// "pkgrel=1",
|
||||||
"pkgdesc='The AI coding agent built for the terminal.'",
|
// "pkgdesc='The AI coding agent built for the terminal.'",
|
||||||
"url='https://github.com/sst/opencode'",
|
// "url='https://github.com/sst/opencode'",
|
||||||
"arch=('aarch64' 'x86_64')",
|
// "arch=('aarch64' 'x86_64')",
|
||||||
"license=('MIT')",
|
// "license=('MIT')",
|
||||||
"provides=('opencode')",
|
// "provides=('opencode')",
|
||||||
"conflicts=('opencode')",
|
// "conflicts=('opencode')",
|
||||||
"depends=('fzf' 'ripgrep')",
|
// "depends=('fzf' 'ripgrep')",
|
||||||
"",
|
// "",
|
||||||
`source_aarch64=("\${pkgname}_\${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v${version}/opencode-linux-arm64.zip")`,
|
// `source_aarch64=("\${pkgname}_\${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v${version}/opencode-linux-arm64.zip")`,
|
||||||
`sha256sums_aarch64=('${arm64Sha}')`,
|
// `sha256sums_aarch64=('${arm64Sha}')`,
|
||||||
"",
|
// "",
|
||||||
`source_x86_64=("\${pkgname}_\${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v${version}/opencode-linux-x64.zip")`,
|
// `source_x86_64=("\${pkgname}_\${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v${version}/opencode-linux-x64.zip")`,
|
||||||
`sha256sums_x86_64=('${x64Sha}')`,
|
// `sha256sums_x86_64=('${x64Sha}')`,
|
||||||
"",
|
// "",
|
||||||
"package() {",
|
// "package() {",
|
||||||
' install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"',
|
// ' install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"',
|
||||||
"}",
|
// "}",
|
||||||
"",
|
// "",
|
||||||
].join("\n")
|
// ].join("\n")
|
||||||
|
|
||||||
for (const pkg of ["opencode", "opencode-bin"]) {
|
// for (const pkg of ["opencode", "opencode-bin"]) {
|
||||||
await $`rm -rf ./dist/aur-${pkg}`
|
// await $`rm -rf ./dist/aur-${pkg}`
|
||||||
await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}`
|
// await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}`
|
||||||
await $`cd ./dist/aur-${pkg} && git checkout master`
|
// await $`cd ./dist/aur-${pkg} && git checkout master`
|
||||||
await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(pkgbuild.replace("${pkg}", 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} && makepkg --printsrcinfo > .SRCINFO`
|
||||||
await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO`
|
// await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO`
|
||||||
await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${version}"`
|
// await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${version}"`
|
||||||
if (!dry) await $`cd ./dist/aur-${pkg} && git push`
|
// if (!dry) await $`cd ./dist/aur-${pkg} && git push`
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Homebrew formula
|
// Homebrew formula
|
||||||
const homebrewFormula = [
|
const homebrewFormula = [
|
||||||
|
|||||||
Reference in New Issue
Block a user