@@ -57,8 +57,7 @@ for (const [os, arch] of targets) {
5757 2 ,
5858 ) ,
5959 )
60- if ( ! dry )
61- await $ `cd dist/${ name } && bun publish --access public --tag ${ npmTag } `
60+ if ( ! dry ) await $ `cd dist/${ name } && bun publish --access public --tag ${ npmTag } `
6261 optionalDependencies [ name ] = version
6362}
6463
@@ -82,24 +81,19 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
8281 2 ,
8382 ) ,
8483)
85- if ( ! dry )
86- await $ `cd ./dist/${ pkg . name } && bun publish --access public --tag ${ npmTag } `
84+ if ( ! dry ) await $ `cd ./dist/${ pkg . name } && bun publish --access public --tag ${ npmTag } `
8785
8886if ( ! snapshot ) {
8987 // Github Release
9088 for ( const key of Object . keys ( optionalDependencies ) ) {
9189 await $ `cd dist/${ key } /bin && zip -r ../../${ key } .zip *`
9290 }
9391
94- const previous = await fetch (
95- "https://api.github.com/repos/sst/opencode/releases/latest" ,
96- )
92+ const previous = await fetch ( "https://api.github.com/repos/sst/opencode/releases/latest" )
9793 . then ( ( res ) => res . json ( ) )
9894 . then ( ( data ) => data . tag_name )
9995
100- const commits = await fetch (
101- `https://api.github.com/repos/sst/opencode/compare/${ previous } ...HEAD` ,
102- )
96+ const commits = await fetch ( `https://api.github.com/repos/sst/opencode/compare/${ previous } ...HEAD` )
10397 . then ( ( res ) => res . json ( ) )
10498 . then ( ( data ) => data . commits || [ ] )
10599
@@ -117,26 +111,13 @@ if (!snapshot) {
117111 } )
118112 . join ( "\n" )
119113
120- if ( ! dry )
121- await $ `gh release create v${ version } --title "v${ version } " --notes ${ notes } ./dist/*.zip`
114+ if ( ! dry ) await $ `gh release create v${ version } --title "v${ version } " --notes ${ notes } ./dist/*.zip`
122115
123116 // Calculate SHA values
124- const arm64Sha =
125- await $ `sha256sum ./dist/opencode-linux-arm64.zip | cut -d' ' -f1`
126- . text ( )
127- . then ( ( x ) => x . trim ( ) )
128- const x64Sha =
129- await $ `sha256sum ./dist/opencode-linux-x64.zip | cut -d' ' -f1`
130- . text ( )
131- . then ( ( x ) => x . trim ( ) )
132- const macX64Sha =
133- await $ `sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`
134- . text ( )
135- . then ( ( x ) => x . trim ( ) )
136- const macArm64Sha =
137- await $ `sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`
138- . text ( )
139- . then ( ( x ) => x . trim ( ) )
117+ const arm64Sha = await $ `sha256sum ./dist/opencode-linux-arm64.zip | cut -d' ' -f1` . text ( ) . then ( ( x ) => x . trim ( ) )
118+ const x64Sha = await $ `sha256sum ./dist/opencode-linux-x64.zip | cut -d' ' -f1` . text ( ) . then ( ( x ) => x . trim ( ) )
119+ const macX64Sha = await $ `sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1` . text ( ) . then ( ( x ) => x . trim ( ) )
120+ const macArm64Sha = await $ `sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1` . text ( ) . then ( ( x ) => x . trim ( ) )
140121
141122 // AUR package
142123 const pkgbuild = [
@@ -170,9 +151,7 @@ if (!snapshot) {
170151 for ( const pkg of [ "opencode" , "opencode-bin" ] ) {
171152 await $ `rm -rf ./dist/aur-${ pkg } `
172153 await $ `git clone ssh://aur@aur.archlinux.org/${ pkg } .git ./dist/aur-${ pkg } `
173- await Bun . file ( `./dist/aur-${ pkg } /PKGBUILD` ) . write (
174- pkgbuild . replace ( "${pkg}" , pkg ) ,
175- )
154+ await Bun . file ( `./dist/aur-${ pkg } /PKGBUILD` ) . write ( pkgbuild . replace ( "${pkg}" , pkg ) )
176155 await $ `cd ./dist/aur-${ pkg } && makepkg --printsrcinfo > .SRCINFO`
177156 await $ `cd ./dist/aur-${ pkg } && git add PKGBUILD .SRCINFO`
178157 await $ `cd ./dist/aur-${ pkg } && git commit -m "Update to v${ version } "`
0 commit comments