Skip to content

Build your personal knowledge base with Trilium Notes

fix(scripts): correctly extract current version for nightly updates

Elian Doranaf7057f06203
diff --git a/scripts/update-nightly-version.ts b/scripts/update-nightly-version.ts
index 32bca10f34..c7496e5856 100644
--- a/scripts/update-nightly-version.ts
+++ b/scripts/update-nightly-version.ts
@@ -29,7 +29,7 @@ function processVersion(version) {
function patchPackageJson(packageJsonPath) {
// Read the version from package.json and process it.
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
- const currentVersion = packageJson.version;
+ const currentVersion = packageJson.version.split("-test-")[0];
const adjustedVersion = processVersion(currentVersion);
console.log("Current version is", currentVersion);
console.log("Adjusted version is", adjustedVersion);