@@ -5,6 +5,9 @@ const readline = require("readline")
55// detect "yes" flags
66const autoYes = process . argv . includes ( "-y" )
77
8+ // detect nightly flag
9+ const isNightly = process . argv . includes ( "--nightly" )
10+
811// detect editor command from args or default to "code"
912const editorArg = process . argv . find ( ( arg ) => arg . startsWith ( "--editor=" ) )
1013const defaultEditor = editorArg ? editorArg . split ( "=" ) [ 1 ] : "code"
@@ -24,14 +27,29 @@ const askQuestion = (question) => {
2427
2528async function main ( ) {
2629 try {
27- const packageJson = JSON . parse ( fs . readFileSync ( "./src/package.json" , "utf-8" ) )
28- const name = packageJson . name
29- const version = packageJson . version
30+ let name , version , publisher
31+
32+ if ( isNightly ) {
33+ // For nightly, read the nightly-specific package.json and get publisher from src
34+ const nightlyPackageJson = JSON . parse (
35+ fs . readFileSync ( "./apps/vscode-nightly/package.nightly.json" , "utf-8" ) ,
36+ )
37+ const srcPackageJson = JSON . parse ( fs . readFileSync ( "./src/package.json" , "utf-8" ) )
38+ name = nightlyPackageJson . name
39+ version = nightlyPackageJson . version
40+ publisher = srcPackageJson . publisher
41+ } else {
42+ const packageJson = JSON . parse ( fs . readFileSync ( "./src/package.json" , "utf-8" ) )
43+ name = packageJson . name
44+ version = packageJson . version
45+ publisher = packageJson . publisher
46+ }
47+
3048 const vsixFileName = `./bin/${ name } -${ version } .vsix`
31- const publisher = packageJson . publisher
3249 const extensionId = `${ publisher } .${ name } `
50+ const buildType = isNightly ? "Nightly" : "Regular"
3351
34- console . log ( " \n🚀 Roo Code VSIX Installer" )
52+ console . log ( ` \n🚀 Roo Code VSIX Installer ( ${ buildType } )` )
3553 console . log ( "========================" )
3654 console . log ( "\nThis script will:" )
3755 console . log ( "1. Uninstall any existing version of the Roo Code extension" )
0 commit comments