@@ -49,7 +49,7 @@ const tasks = Object.entries(binaries).map(async ([name]) => {
4949await Promise . all ( tasks )
5050await $ `cd ./dist/${ pkg . name } && bun pm pack && npm publish *.tgz --access public --tag ${ Script . channel } `
5151
52- // registries
52+ // registries (AUR, Homebrew)
5353if ( ! Script . preview ) {
5454 // Calculate SHA values
5555 const arm64Sha = await $ `sha256sum "./dist/altimate-code-linux-arm64.tar.gz" | cut -d' ' -f1` . text ( ) . then ( ( x ) => x . trim ( ) )
@@ -59,53 +59,19 @@ if (!Script.preview) {
5959
6060 const [ pkgver , _subver = "" ] = Script . version . split ( / ( - .* ) / , 2 )
6161
62- // arch
63- const binaryPkgbuild = [
64- "# Maintainer: dax" ,
65- "# Maintainer: adam" ,
66- "" ,
67- "pkgname='altimate-code-bin'" ,
68- `pkgver=${ pkgver } ` ,
69- `_subver=${ _subver } ` ,
70- "options=('!debug' '!strip')" ,
71- "pkgrel=1" ,
72- "pkgdesc='AI-powered CLI for SQL analysis, dbt integration, and data engineering'" ,
73- "url='https://github.com/AltimateAI/altimate-code'" ,
74- "arch=('aarch64' 'x86_64')" ,
75- "license=('MIT')" ,
76- "provides=('altimate-code')" ,
77- "conflicts=('altimate-code')" ,
78- "depends=('ripgrep')" ,
79- "" ,
80- `source_aarch64=("\${pkgname}_\${pkgver}_aarch64.tar.gz::https://github.com/AltimateAI/altimate-code/releases/download/v\${pkgver}\${_subver}/altimate-code-linux-arm64.tar.gz")` ,
81- `sha256sums_aarch64=('${ arm64Sha } ')` ,
82-
83- `source_x86_64=("\${pkgname}_\${pkgver}_x86_64.tar.gz::https://github.com/AltimateAI/altimate-code/releases/download/v\${pkgver}\${_subver}/altimate-code-linux-x64.tar.gz")` ,
84- `sha256sums_x86_64=('${ x64Sha } ')` ,
85- "" ,
86- "package() {" ,
87- ' install -Dm755 ./altimate-code "${pkgdir}/usr/bin/altimate-code"' ,
88- "}" ,
89- "" ,
90- ] . join ( "\n" )
91-
92- for ( const [ pkg , pkgbuild ] of [ [ "altimate-code-bin" , binaryPkgbuild ] ] ) {
93- for ( let i = 0 ; i < 30 ; i ++ ) {
94- try {
95- await $ `rm -rf ./dist/aur-${ pkg } `
96- await $ `git clone ssh://aur@aur.archlinux.org/${ pkg } .git ./dist/aur-${ pkg } `
97- await $ `cd ./dist/aur-${ pkg } && git checkout master`
98- await Bun . file ( `./dist/aur-${ pkg } /PKGBUILD` ) . write ( pkgbuild )
99- await $ `cd ./dist/aur-${ pkg } && makepkg --printsrcinfo > .SRCINFO`
100- await $ `cd ./dist/aur-${ pkg } && git add PKGBUILD .SRCINFO`
101- await $ `cd ./dist/aur-${ pkg } && git commit -m "Update to v${ Script . version } "`
102- await $ `cd ./dist/aur-${ pkg } && git push`
103- break
104- } catch ( e ) {
105- continue
106- }
107- }
108- }
62+ // TODO: AUR (Arch User Repository) publishing — skipped for now
63+ // To enable AUR publishing:
64+ // 1. Create an AUR account at https://aur.archlinux.org/register
65+ // 2. Generate an SSH key: ssh-keygen -t ed25519 -C "altimate-aur-ci" -f aur_ed25519 -N ""
66+ // 3. Add the public key (aur_ed25519.pub) to AUR: My Account > SSH Public Key
67+ // 4. Register the package on AUR: Submit Request > Package Name: "altimate-code-bin"
68+ // 5. Add private key as GitHub secret: AUR_SSH_PRIVATE_KEY
69+ // 6. Uncomment the "Configure SSH for AUR" step in .github/workflows/release.yml
70+ // 7. Uncomment the AUR block below
71+ //
72+ // The PKGBUILD and .SRCINFO are generated in TypeScript (no makepkg/Arch dependency).
73+ // The flow: clone AUR repo via SSH → write PKGBUILD + .SRCINFO → commit → push.
74+ // Uses arm64Sha, x64Sha, pkgver, _subver from above.
10975
11076 // Homebrew formula
11177 const homebrewFormula = [
@@ -175,6 +141,8 @@ if (!Script.preview) {
175141 await $ `rm -rf ./dist/homebrew-tap`
176142 await $ `git clone https://github.com/AltimateAI/homebrew-tap.git ./dist/homebrew-tap`
177143 await Bun . file ( "./dist/homebrew-tap/altimate-code.rb" ) . write ( homebrewFormula )
144+ await $ `cd ./dist/homebrew-tap && git config user.name "AltimateAI Bot"`
145+ await $ `cd ./dist/homebrew-tap && git config user.email "bot@altimate.ai"`
178146 await $ `cd ./dist/homebrew-tap && git add altimate-code.rb`
179147 await $ `cd ./dist/homebrew-tap && git commit -m "Update to v${ Script . version } "`
180148 await $ `cd ./dist/homebrew-tap && git push` . env ( gitAuthEnv )
0 commit comments