Sfoglia il codice sorgente

fix(desktop): embed version in server sidecar (#40764)

Luke Parker 2 giorni fa
parent
commit
24470e52a5
2 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 1 0
      .github/workflows/publish.yml
  2. 1 0
      packages/opencode/script/build-node.ts

+ 1 - 0
.github/workflows/publish.yml

@@ -322,6 +322,7 @@ jobs:
         working-directory: packages/desktop
         env:
           NODE_OPTIONS: --max-old-space-size=4096
+          OPENCODE_VERSION: ${{ needs.version.outputs.version }}
           OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
           SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
           SENTRY_ORG: ${{ vars.SENTRY_ORG }}

+ 1 - 0
packages/opencode/script/build-node.ts

@@ -21,6 +21,7 @@ await Bun.build({
   external: ["jsonc-parser", "@lydell/node-pty"],
   define: {
     OPENCODE_MODELS_DEV: generated.modelsData,
+    OPENCODE_VERSION: `'${Script.version}'`,
     OPENCODE_CHANNEL: `'${Script.channel}'`,
   },
   files: {