From b938486ebe822cc4b7a344e8966eba9fb0a2dc73 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 3 Sep 2021 13:54:47 -0700 Subject: [PATCH] In CLI, get tree-sitter binding version from CLI's Cargo.toml --- cli/Cargo.toml | 12 ++++++------ cli/build.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 75f7a95b..e559842f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -41,28 +41,28 @@ webbrowser = "0.5.1" which = "4.1.0" [dependencies.tree-sitter] -version = ">= 0.17.0" +version = "0.20" path = "../lib" [dev-dependencies.tree-sitter] -version = ">= 0.17.0" +version = "0.20" path = "../lib" features = ["allocation-tracking"] [dependencies.tree-sitter-config] -version = ">= 0.19.0" +version = "0.19.0" path = "config" [dependencies.tree-sitter-highlight] -version = ">= 0.3.0" +version = "0.20" path = "../highlight" [dependencies.tree-sitter-loader] -version = ">= 0.19.0" +version = "0.19.0" path = "loader" [dependencies.tree-sitter-tags] -version = ">= 0.1.0" +version = "0.20" path = "../tags" [dependencies.serde_json] diff --git a/cli/build.rs b/cli/build.rs index f62f83aa..e8a1320b 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -82,10 +82,10 @@ fn read_git_sha() -> Option { } fn read_rust_binding_version() -> String { - let path = "../lib/Cargo.toml"; + let path = "Cargo.toml"; let text = fs::read_to_string(path).unwrap(); let cargo_toml = toml::from_str::(text.as_ref()).unwrap(); - cargo_toml["package"]["version"] + cargo_toml["dependencies"]["tree-sitter"]["version"] .as_str() .unwrap() .trim_matches('"')