Skip to content

Commit 73e6ae8

Browse files
authored
chore: bump crate versions in non-debug non-snapshot releases only (#11017)
1 parent 9353221 commit 73e6ae8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scripts/release/version.mjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ export async function version_handler(version, options) {
9191
} else {
9292
nextVersion = semver.inc(lastVersion, version);
9393
}
94+
// Rust crate version is major version of `@rspack/core` - 1
95+
const nextCrateVersion = nextVersion.replace(
96+
/^(\d+)/,
97+
(match, major) => Number.parseInt(major) - 1
98+
);
99+
await $`${path.resolve(path.dirname(new URL(import.meta.url).pathname), "../../x")} crate-version custom ${nextCrateVersion}`;
94100
}
95101

96-
// Rust crate version is major version of `@rspack/core` - 1
97-
const nextCrateVersion = nextVersion.replace(
98-
/^(\d+)/,
99-
(match, major) => Number.parseInt(major) - 1
100-
);
101-
await $`${path.resolve(path.dirname(new URL(import.meta.url).pathname), "../../x")} crate-version custom ${nextCrateVersion}`;
102-
103102
const packageFiles = await glob("{packages,npm,crates}/*/package.json", {
104103
cwd: root,
105104
ignore: ["**/node_modules/**", "**/dist/**"],

0 commit comments

Comments
 (0)