Update version fixing

This commit is contained in:
Mayuran Visakan 2023-08-30 20:34:56 +01:00
parent 5ae8e57aae
commit 9e0270e906
4 changed files with 9 additions and 14 deletions

View file

@ -8,7 +8,8 @@
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"update": "ncu -u && npm install && node manual-update.mjs",
"lint": "eslint --fix --max-warnings=0 src && stylelint --fix --max-warnings=0 src/styles.css src/css",
"version": "node version-bump.mjs"
"version": "node version-bump.mjs",
"rerelease": "node version-rerelease.mjs"
},
"keywords": [],
"author": "Mayuran Visakan",

View file

@ -28,6 +28,6 @@ writeFileSync("src/settings.ts",settingsText.replace(/(?<=export const DEFAULT_S
// Push to origin
exec(`git add . && git commit -m 'Ready release ${newVersion}' && git push && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version && git push origin $npm_package_version
exec(`git add . && git commit -m 'Ready release ${newVersion}' && git push && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version
$release_notes
EOF`,(error)=>console.log(error));

View file

@ -1,12 +0,0 @@
import { exec } from "child_process";
// Get new version
const revertVersion = process.env.npm_package_version;
//<!-- Revert a broken release using `git reset --hard commitSHA && git push --force origin commitSHA:master` and `git tag -d x.y.z && git push -d origin x.y.z` -->
// Push to origin
exec(`git add . && git commit -m 'Ready release ${newVersion}' && git push && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version && git push origin $npm_package_version
$release_notes
EOF`,(error)=>console.log(error));

6
version-rerelease.mjs Normal file
View file

@ -0,0 +1,6 @@
import { exec } from "child_process";
// Remove tag and re-push tag
exec(`git tag -d $npm_package_version && git push -d origin $npm_package_version && git tag -a $npm_package_version -F- <<EOF && git push origin $npm_package_version
Add release notes from changelog
EOF`,(error)=>console.log(error));