Skip to content

Commit 23b5984

Browse files
committed
fix: print bumped version
1 parent 73c1cce commit 23b5984

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cli/semver.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { readFileSync, writeFileSync } from "fs";
22
import { inc } from "semver";
33

4+
let version = "";
5+
46
const jsons = [
57
"./package.json",
68
"./frontend/package.json",
@@ -9,13 +11,13 @@ const jsons = [
911

1012
const packages = jsons.map((json) => {
1113
const file = JSON.parse(readFileSync(json, "utf8"));
12-
const version = inc(file.version, "patch");
14+
version = inc(file.version, "patch");
1315
file.version = version;
14-
return file
16+
return file;
1517
});
1618

1719
jsons.forEach((json, index) =>
1820
writeFileSync(json, JSON.stringify(packages[index], null, 2)),
1921
);
2022

21-
console.log(`Version bumped to ${newVersion}`);
23+
console.log(`Version bumped to ${version}`);

0 commit comments

Comments
 (0)