GeezerVison is showing github.com — ci stuff · ccheever/opencode@b5a039e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: install +21-5Lines changed: 21 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,11 @@ elif [[ "$arch" == "x86_64" ]]; then |
25 | 25 | arch="x64" |
26 | 26 | fi |
27 | 27 |
|
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 |
29 | 33 |
|
30 | 34 |
|
31 | 35 | case "$filename" in |
@@ -44,9 +48,16 @@ case "$filename" in |
44 | 48 | ;; |
45 | 49 | esac |
46 | 50 |
|
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 |
50 | 61 | fi |
51 | 62 |
|
52 | 63 | INSTALL_DIR=$HOME/.opencode/bin |
@@ -197,7 +208,12 @@ download_and_install() { |
197 | 208 | curl -# -L -o "$filename" "$url" |
198 | 209 | fi |
199 | 210 |
|
200 | | - unzip -q "$filename" |
| 211 | + if [ "$os" = "linux" ]; then |
| 212 | + tar -xzf "$filename" |
| 213 | + else |
| 214 | + unzip -q "$filename" |
| 215 | + fi |
| 216 | + |
201 | 217 | mv opencode "$INSTALL_DIR" |
202 | 218 | chmod 755 "${INSTALL_DIR}/opencode" |
203 | 219 | cd .. && rm -rf opencodetmp |
|
Collapse file
Copy file name to clipboard +10Lines changed: 10 additions & 0 deletions | 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 | + |
Collapse file
Copy file name to clipboardExpand all lines: script/publish.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -115,5 +115,5 @@ if (!Script.preview) { |
115 | 115 | await $`git cherry-pick HEAD..origin/dev`.nothrow() |
116 | 116 | await $`git push origin HEAD --tags --no-verify --force-with-lease` |
117 | 117 | 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` |
119 | 119 | } |