File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ elif [[ "$arch" == "x86_64" ]]; then
2525 arch=" x64"
2626fi
2727
28- filename=" $APP -$os -$arch .zip"
28+ if [ " $os " = " linux" ]; then
29+ filename=" $APP -$os -$arch .tar.gz"
30+ else
31+ filename=" $APP -$os -$arch .zip"
32+ fi
2933
3034
3135case " $filename " in
@@ -44,9 +48,16 @@ case "$filename" in
4448 ;;
4549esac
4650
47- if ! command -v unzip > /dev/null 2>&1 ; then
48- echo -e " ${RED} Error: 'unzip' is required but not installed.${NC} "
49- exit 1
51+ if [ " $os " = " linux" ]; then
52+ if ! command -v tar > /dev/null 2>&1 ; then
53+ echo -e " ${RED} Error: 'tar' is required but not installed.${NC} "
54+ exit 1
55+ fi
56+ else
57+ if ! command -v unzip > /dev/null 2>&1 ; then
58+ echo -e " ${RED} Error: 'unzip' is required but not installed.${NC} "
59+ exit 1
60+ fi
5061fi
5162
5263INSTALL_DIR=$HOME /.opencode/bin
@@ -197,7 +208,12 @@ download_and_install() {
197208 curl -# -L -o " $filename " " $url "
198209 fi
199210
200- unzip -q " $filename "
211+ if [ " $os " = " linux" ]; then
212+ tar -xzf " $filename "
213+ else
214+ unzip -q " $filename "
215+ fi
216+
201217 mv opencode " $INSTALL_DIR "
202218 chmod 755 " ${INSTALL_DIR} /opencode"
203219 cd .. && rm -rf opencodetmp
Original file line number Diff line number Diff line change 1+ FROM alpine
2+
3+ # Disable the runtime transpiler cache by default inside Docker containers.
4+ # On ephemeral containers, the cache is not useful
5+ ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
6+ ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}
7+ RUN apk add libgcc libstdc++
8+ ADD ./dist/opencode-linux-x64-baseline-musl/bin/opencode .
9+ RUN ./opencode --version
10+
Original file line number Diff line number Diff line change @@ -115,5 +115,5 @@ if (!Script.preview) {
115115 await $ `git cherry-pick HEAD..origin/dev` . nothrow ( )
116116 await $ `git push origin HEAD --tags --no-verify --force-with-lease`
117117 await new Promise ( ( resolve ) => setTimeout ( resolve , 5_000 ) )
118- await $ `gh release create v${ Script . version } --title "v${ Script . version } " --notes ${ notes . join ( "\n" ) ?? "No notable changes" } ./packages/opencode/dist/*.zip`
118+ await $ `gh release create v${ Script . version } --title "v${ Script . version } " --notes ${ notes . join ( "\n" ) ?? "No notable changes" } ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz `
119119}
You can’t perform that action at this time.
0 commit comments