Skip to content

Commit

Permalink
Bump to version 0.2.3
Browse files Browse the repository at this point in the history
And add an assert that both version numbers are in sync
  • Loading branch information
vogelsgesang committed Feb 13, 2025
1 parent c28da75 commit c776c49
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bazelrc-lsp"
version = "0.2.2"
version = "0.2.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
15 changes: 12 additions & 3 deletions vscode-extension/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,24 @@ async function build() {
}

// Check if `./package.json` is up-to-date
const versions = JSON.parse(await fs.readFile("./package.json"))
const packageJson = JSON.parse(await fs.readFile("./package.json"));
console.log((await execFile(bazelrcExec, ["--version"])).stdout.trim());
const bazelrclspVersion = (await execFile(bazelrcExec, ["--version"])).stdout.trim().match("bazelrc-lsp (\\d+.\\d+.\\d+)")[1];
if (bazelrclspVersion != packageJson.version) {
console.error("Error: Mismatch between package.json version and bazelrc version");
console.error("package.json versions:", packageJson.version);
console.error("bazelrc-lsp versions:", bazelrclspVersion);
throw new Error("Version mismatch detected.");
}
const versions = packageJson
.contributes.configuration.properties["bazelrc.bazelVersion"].enum;
const rustVersionsJson = (await execFile(bazelrcExec, ["bazel-versions"])).stdout;
const rustVersions = JSON.parse(rustVersionsJson);
const expectedVersions = ["auto"].concat(rustVersions)
if (!areStringArraysEqual(versions, expectedVersions)) {
console.error("Error: Mismatch between package.json versions and Rust versions");
console.error("Error: Mismatch between supported Bazel version");
console.error("package.json versions:", versions);
console.error("Rust versions:", rustVersions);
console.error("bazelrc-lsp versions:", rustVersions);
throw new Error("Version mismatch detected.");
}

Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "bazelrc language server",
"publisher": "Adrian Vogelsgesang",
"license": "Apache-2.0",
"version": "0.2.2",
"version": "0.2.3",
"categories": [
"Programming Languages",
"Formatters",
Expand Down

0 comments on commit c776c49

Please sign in to comment.