chore: bootstrap independent git workflow
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
11
scripts/release/version.mjs
Normal file
11
scripts/release/version.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const cargoToml = readFileSync(new URL("../../Cargo.toml", import.meta.url), "utf8");
|
||||
const match = cargoToml.match(/\[workspace\.package\][\s\S]*?version\s*=\s*"([^"]+)"/);
|
||||
|
||||
if (!match) {
|
||||
console.error("failed to resolve workspace.package.version from Cargo.toml");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
process.stdout.write(match[1]);
|
||||
Reference in New Issue
Block a user