mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
fix: support pre-release versions in build script
This commit is contained in:
parent
a049c827a6
commit
56c851c5a4
1 changed files with 2 additions and 2 deletions
|
|
@ -5,9 +5,9 @@ import { execSync } from "child_process";
|
|||
const manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
|
||||
const currentVersion = manifest.version;
|
||||
|
||||
// Parse semantic version
|
||||
// Parse semantic version (supports pre-release versions like 4.0.0-beta.0)
|
||||
function parseVersion(version) {
|
||||
const match = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
||||
const match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-[\w.]+)?$/);
|
||||
if (!match) return null;
|
||||
return {
|
||||
major: parseInt(match[1]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue