The open source coding agent.
TypeScript
ci stuff
Dax Raadb5a039e5aed8
diff --git a/install b/installindex e7090ad4fb7..f60a7264237 100755--- a/install+++ b/install@@ -25,7 +25,11 @@ elif [[ "$arch" == "x86_64" ]]; thenarch="x64"fi-filename="$APP-$os-$arch.zip"+if [ "$os" = "linux" ]; then+ filename="$APP-$os-$arch.tar.gz"+else+ filename="$APP-$os-$arch.zip"+ficase "$filename" in@@ -44,9 +48,16 @@ case "$filename" in;;esac-if ! command -v unzip >/dev/null 2>&1; then- echo -e "${RED}Error: 'unzip' is required but not installed.${NC}"- exit 1+if [ "$os" = "linux" ]; then+ if ! command -v tar >/dev/null 2>&1; then+ echo -e "${RED}Error: 'tar' is required but not installed.${NC}"+ exit 1+ fi+else+ if ! command -v unzip >/dev/null 2>&1; then+ echo -e "${RED}Error: 'unzip' is required but not installed.${NC}"+ exit 1+ fifiINSTALL_DIR=$HOME/.opencode/bin@@ -197,7 +208,12 @@ download_and_install() {curl -# -L -o "$filename" "$url"fi- unzip -q "$filename"+ if [ "$os" = "linux" ]; then+ tar -xzf "$filename"+ else+ unzip -q "$filename"+ fi+mv opencode "$INSTALL_DIR"chmod 755 "${INSTALL_DIR}/opencode"cd .. && rm -rf opencodetmpdiff --git a/packages/opencode/Dockerfile b/packages/opencode/Dockerfilenew file mode 100644index 00000000000..1799fc7f7f1--- /dev/null+++ b/packages/opencode/Dockerfile@@ -0,0 +1,10 @@+FROM alpine++# Disable the runtime transpiler cache by default inside Docker containers.+# On ephemeral containers, the cache is not useful+ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0+ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}+RUN apk add libgcc libstdc+++ADD ./dist/opencode-linux-x64-baseline-musl/bin/opencode .+RUN ./opencode --version+diff --git a/script/publish.ts b/script/publish.tsindex a5006b1c623..2d20057d2aa 100755--- a/script/publish.ts+++ b/script/publish.ts@@ -115,5 +115,5 @@ if (!Script.preview) {await $`git cherry-pick HEAD..origin/dev`.nothrow()await $`git push origin HEAD --tags --no-verify --force-with-lease`await new Promise((resolve) => setTimeout(resolve, 5_000))- await $`gh release create v${Script.version} --title "v${Script.version}" --notes ${notes.join("\n") ?? "No notable changes"} ./packages/opencode/dist/*.zip`+ 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`}