Parcourir la source

Publish gui-only variant

paviko il y a 1 mois
Parent
commit
3b32bbfe52
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      hosts/vscode-plugin/package.json

+ 1 - 0
hosts/vscode-plugin/package.json

@@ -195,6 +195,7 @@
     "package:dev": "cd ../ && ./scripts/build-vscode.sh --skip-tests",
     "package:pre-release": "pnpm run compile:production && vsce package --pre-release --no-dependencies",
     "publish": "pnpm run compile:production && vsce publish --no-dependencies",
+    "publish:gui-only": "(cd ../../packages/opencode/webgui && (bun run build 2>/dev/null || npm run build)) && rm -rf resources/webgui-app && cp -r ../../packages/opencode/webgui-dist resources/webgui-app && mv resources/bin /tmp/opencode-bin-stash-$$ 2>/dev/null || true && cp package.json package.json.bak && cp .vscodeignore .vscodeignore.bak && node -e \"const fs=require('fs');function d(t,s){for(const k of Object.keys(s)){const a=s[k],b=t[k];Array.isArray(a)&&Array.isArray(b)?a.forEach((v,i)=>{i<b.length&&typeof v=='object'&&typeof b[i]=='object'?d(b[i],v):b[i]=v}):a&&typeof a=='object'&&!Array.isArray(a)&&b&&typeof b=='object'&&!Array.isArray(b)?d(b,a):t[k]=a}return t}const b=JSON.parse(fs.readFileSync('package.json'));const o=JSON.parse(fs.readFileSync('package.gui-only.json'));fs.writeFileSync('package.json',JSON.stringify(d(b,o),null,2))\" && cp .vscodeignore.gui-only .vscodeignore && vsce publish --no-dependencies; EXIT=$?; mv package.json.bak package.json 2>/dev/null || true; mv .vscodeignore.bak .vscodeignore 2>/dev/null || true; mv /tmp/opencode-bin-stash-$$/bin resources/bin 2>/dev/null || true; rm -rf resources/webgui-app /tmp/opencode-bin-stash-$$; exit $EXIT",
     "publish:pre-release": "pnpm run compile:production && vsce publish --pre-release --no-dependencies",
     "install:vsce": "npm install -g @vscode/vsce",
     "clean": "rimraf out *.vsix",