mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(vscode): publish extension as release instead of pre-release
Remove --pre-release flag from vsce package and vsce publish commands. Previously the VS Code Marketplace received a pre-release VSIX while Open VSX received a production VSIX. Now both receive the same production VSIX built without --pre-release, eliminating the separate out/prod/ directory.
This commit is contained in:
@@ -36,10 +36,9 @@ const targets = [
|
||||
const binDir = join(import.meta.dir, "..", "bin")
|
||||
const distDir = join(import.meta.dir, "..", "dist")
|
||||
const outDir = join(import.meta.dir, "..", "out")
|
||||
const outDirProd = join(import.meta.dir, "..", "out", "prod")
|
||||
|
||||
console.log("\n🧹 Cleaning up directories...")
|
||||
for (const dir of [binDir, distDir, outDir, outDirProd]) {
|
||||
for (const dir of [binDir, distDir, outDir]) {
|
||||
if (existsSync(dir)) {
|
||||
rmSync(dir, { recursive: true, force: true })
|
||||
console.log(` ✓ Cleaned ${dir}`)
|
||||
@@ -48,7 +47,6 @@ for (const dir of [binDir, distDir, outDir, outDirProd]) {
|
||||
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
mkdirSync(distDir, { recursive: true })
|
||||
mkdirSync(outDirProd, { recursive: true })
|
||||
|
||||
console.log("\n🔄 Rebuilding SDK types (ensures dist/ is in sync with server API)...")
|
||||
await $`bun run --cwd ${join(import.meta.dir, "..", "..", "sdk", "js")} build`
|
||||
@@ -84,18 +82,11 @@ for (const config of targets) {
|
||||
|
||||
console.log(` 📦 Packaging .vsix for ${config.target}...`)
|
||||
const vsixPath = join(outDir, `kilo-vscode-${config.target}.vsix`)
|
||||
await $`vsce package --pre-release --no-dependencies --skip-license --target ${config.target} -o ${vsixPath}`.env({
|
||||
await $`vsce package --no-dependencies --skip-license --target ${config.target} -o ${vsixPath}`.env({
|
||||
...process.env,
|
||||
npm_config_ignore_scripts: "true",
|
||||
})
|
||||
console.log(` ✅ Created ${vsixPath}`)
|
||||
|
||||
const prodVsixPath = join(outDirProd, `kilo-vscode-${config.target}.vsix`)
|
||||
await $`vsce package --no-dependencies --skip-license --target ${config.target} -o ${prodVsixPath}`.env({
|
||||
...process.env,
|
||||
npm_config_ignore_scripts: "true",
|
||||
})
|
||||
console.log(` ✅ Created ${prodVsixPath}`)
|
||||
}
|
||||
|
||||
console.log("\n✨ All VSIX packages built successfully!")
|
||||
|
||||
@@ -7,7 +7,6 @@ import { Script } from "@opencode-ai/script"
|
||||
console.log(`Publishing VSCode extension for release: v${Script.version}`)
|
||||
|
||||
const outDir = process.env.VSIX_DIR || join(import.meta.dir, "..", "out")
|
||||
const outDirProd = join(outDir, "prod")
|
||||
|
||||
console.log(`Using VSIX directory: ${outDir}`)
|
||||
|
||||
@@ -40,13 +39,12 @@ console.log(`\nFound ${vsixFiles.length} VSIX files`)
|
||||
for (const target of targets) {
|
||||
const vsixPath = join(outDir, `kilo-vscode-${target}.vsix`)
|
||||
console.log(`\n🚀 Publishing ${target} to VS Code Marketplace...`)
|
||||
await $`vsce publish --pre-release --packagePath ${vsixPath}`
|
||||
await $`vsce publish --packagePath ${vsixPath}`
|
||||
console.log(` ✅ Published ${target} to VS Code Marketplace`)
|
||||
|
||||
const prodVsixPath = join(outDirProd, `kilo-vscode-${target}.vsix`)
|
||||
console.log(`\n📤 Publishing ${target} to Open VSX...`)
|
||||
await $`npx ovsx publish --pat ${process.env.OPENVSX_TOKEN} --packagePath ${prodVsixPath}`
|
||||
console.log(` ✅ Published Prod ${target} to Open VSX`)
|
||||
await $`npx ovsx publish --pat ${process.env.OPENVSX_TOKEN} --packagePath ${vsixPath}`
|
||||
console.log(` ✅ Published ${target} to Open VSX`)
|
||||
}
|
||||
|
||||
if (Script.release) {
|
||||
|
||||
Reference in New Issue
Block a user