diff options
| author | Dax Raad <[email protected]> | 2026-04-30 00:41:51 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-04-30 00:42:22 -0400 |
| commit | 8ba374fefa51b220ada6be5e9fac487869a3b64c (patch) | |
| tree | b94564c98cbdb2388f1fd6705a8adcc29fde8eb3 | |
| parent | 3ef0aaf768aa488db102454bee1df116c00f2c6f (diff) | |
| download | opencode-8ba374fefa51b220ada6be5e9fac487869a3b64c.tar.gz opencode-8ba374fefa51b220ada6be5e9fac487869a3b64c.zip | |
ci: enable sourcemaps for beta releases
Generate linked sourcemaps when building beta releases to help users
debug issues with readable stack traces.
| -rw-r--r-- | .github/workflows/publish.yml | 2 | ||||
| -rwxr-xr-x | packages/opencode/script/build.ts | 2 |
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, |
