Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version check script #25

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tools/verify-rust-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const cargo_toml_rust_version = cargo_toml_src.split('\n').filter(l => l.startsW

console.log(`Rust version: ${cargo_toml_rust_version}`);

let error = false;

for (const file of files) {
const file_content = fs.readFileSync(file, 'UTF8').toString();
const matches1 = file_content.match(re1);
Expand All @@ -29,7 +27,7 @@ for (const file of files) {
for (const match of matches1) {
if (match !== cargo_toml_rust_version.substring(0, 4)) {
console.error(`Found reference to version ${match}, expected ${cargo_toml_rust_version} in file ${file}`);
error = true;
proc.exitCode = 1; // Non zero code indicates error
}
}
}
Expand All @@ -38,11 +36,9 @@ for (const file of files) {
for (const match of matches2) {
if (match !== cargo_toml_rust_version) {
console.error(`Found reference to version ${match}, expected ${cargo_toml_rust_version} in ${file}`);
error = true;
proc.exitCode = 1; // Non zero code indicates error
}
}
}

}

proc.exit(error);