summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/publish.yml2
-rwxr-xr-xpackages/opencode/script/build.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 6cb6af0a8..fd9b60f8b 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -88,7 +88,7 @@ jobs:
- name: Build
id: build
run: |
- ./packages/opencode/script/build.ts
+ ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }}
env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts
index 85e1e105f..35812f953 100755
--- a/packages/opencode/script/build.ts
+++ b/packages/opencode/script/build.ts
@@ -50,6 +50,7 @@ console.log(`Loaded ${migrations.length} migrations`)
const singleFlag = process.argv.includes("--single")
const baselineFlag = process.argv.includes("--baseline")
const skipInstall = process.argv.includes("--skip-install")
+const sourcemapsFlag = process.argv.includes("--sourcemaps")
const plugin = createSolidTransformPlugin()
const skipEmbedWebUi = process.argv.includes("--skip-embed-web-ui")
@@ -199,6 +200,7 @@ for (const item of targets) {
external: ["node-gyp"],
format: "esm",
minify: true,
+ sourcemap: sourcemapsFlag ? "linked" : "none",
splitting: true,
compile: {
autoloadBunfig: false,