Skip to content

Commit b5a039e

Browse files
committed
ci stuff
1 parent 986cc0a commit b5a039e

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

install

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ elif [[ "$arch" == "x86_64" ]]; then
2525
arch="x64"
2626
fi
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

3135
case "$filename" in
@@ -44,9 +48,16 @@ case "$filename" in
4448
;;
4549
esac
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
5061
fi
5162

5263
INSTALL_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

packages/opencode/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+

script/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)