MCPcopy Create free account
hub / github.com/Marus/cortex-debug / run

Function run

release.js:111–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111function run() {
112 let isPkg = true;
113 const argv = [...process.argv];
114 prog = argv[1];
115 argv.shift() ; argv.shift();
116 while (argv.length) {
117 switch (argv[0]) {
118 case '-h':
119 case '--help': {
120 console.log(`Usage: node ${prog} [--dryrun] [--package] [--publish] [--vsx-also]`);
121 console.log('\t--package is by default, true');
122 process.exit(0);
123 }
124 case '--dryrun': {
125 isDryRun = true;
126 console.log(`${prog}: This is a dryrun`);
127 break;
128 }
129 case '--package': {
130 isPkg = true;
131 break;
132 }
133 case '--publish': {
134 isPkg = false;
135 break;
136 }
137 case '--vsx-also': {
138 vsxAlso = true;
139 openVsxPat = process.env.OPEN_VSX_PAT;
140 if (!openVsxPat) {
141 errExit('Environment variable OPEN_VSX_PAT not found');
142 }
143 break;
144 }
145 default: {
146 errExit(`Unknown argument '${argv[0]}'`);
147 process.exit(1);
148 }
149 }
150 argv.shift();
151 }
152 if (isPkg) {
153 vsxAlso = false;
154 }
155 vsceRun(isPkg);
156}
157
158run();

Callers 1

release.jsFile · 0.70

Calls 4

errExitFunction · 0.85
vsceRunFunction · 0.85
logMethod · 0.80
exitMethod · 0.80

Tested by

no test coverage detected