MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / updateKotlinVersion

Function updateKotlinVersion

scripts/update-version.mjs:64–85  ·  view source on GitHub ↗
(buildFile)

Source from the content-addressed store, hash-verified

62}
63
64function updateKotlinVersion(buildFile) {
65 let version = currentNpmVersion;
66 if (process.argv.length === 4) {
67 // node update-version.js alpha 37
68 // -> version = "1.3.1-SNAPSHOT"
69 version = `${version}-SNAPSHOT`;
70 } else if (process.argv.length === 3) {
71 // node update-version.js 37
72 // -> version = "1.3.1"
73 } else {
74 // node update-version.js
75 // -> version = "1.3.1-SNAPSHOT"
76 version = `${version}-SNAPSHOT`;
77 }
78
79 console.log(`Kotlin Path: ${buildFile}`);
80 console.log(` Updating Version to ${version}`);
81
82 let propsSource = fs.readFileSync(buildFile, 'utf-8');
83 propsSource = propsSource.replace(/libVersion\s*= \".*/g, `libVersion = "${version}"`);
84 fs.writeFileSync(buildFile, propsSource);
85}
86
87updateNpmVersion(path.resolve(__dirname, '../package.json'));
88for (const entry of fs.readdirSync(path.resolve(__dirname, '../packages/'), { withFileTypes: true })) {

Callers 1

update-version.mjsFile · 0.85

Calls 2

logMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected