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

Function isPreRelease

release.js:26–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26function isPreRelease() {
27 let obj;
28 const path = './package.json';
29 try {
30 const txt = fs.readFileSync(path);
31 obj = JSON.parse(txt.toString());
32 }
33 catch (e) {
34 errExit(`Could not open/read file ${path}`, e);
35 }
36 const version = obj.version;
37 if (!version) {
38 errExit(`"version" property not found in ${path}`);
39 }
40 const parts = version.split('.');
41 const minor = parseInt(parts[1]);
42 tagName = 'v' + version;
43 return (minor % 2) === 1;
44}
45
46function vsceRun(pkgOnly) {
47 const args = ['npx', 'vsce', (pkgOnly ? 'package' : 'publish')];

Callers 1

vsceRunFunction · 0.85

Calls 2

errExitFunction · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected