Fixed release script.

This commit is contained in:
SamTV12345 2024-03-17 11:51:18 +01:00
parent 19087dac7f
commit 9b1a534f88

View file

@ -149,14 +149,16 @@ try {
console.log(`Bumping ${release} version (to ${newVersion})...`); console.log(`Bumping ${release} version (to ${newVersion})...`);
pkg.version = newVersion; pkg.version = newVersion;
writeJson('./src/package.json', pkg); run(`echo "$(jq '. += {"version": "'${newVersion}'"}' src/package.json)" > src/package.json`)
run(`echo "$(jq '. += {"version": "'${newVersion}'"}' admin/package.json)" > admin/package.json`)
run(`echo "$(jq '. += {"version": "'${newVersion}'"}' bin/package.json)" > bin/package.json`)
run(`echo "$(jq '. += {"version": "'${newVersion}'"}' ./package.json)" > ./package.json`)
// run npm version `release` where release is patch, minor or major // run npm version `release` where release is patch, minor or major
run('pnpm install', {cwd: 'src/'}); run('pnpm install');
// run npm install --package-lock-only <-- required??? // run npm install --package-lock-only <-- required???
run('git add src/package.json'); run('git add -A');
run('git add src/package-lock.json');
run('git commit -m "bump version"'); run('git commit -m "bump version"');
console.log('Switching to master...'); console.log('Switching to master...');
run('git checkout master'); run('git checkout master');