Skip to content

Commit

Permalink
fix(proto-compiler): existence of unzipped tenderdash sources not ver…
Browse files Browse the repository at this point in the history
…ified correctly (#56)

* fix(proto-compiler): better detection of missing protobuf files

* build: release 0.14.0-dev.9
  • Loading branch information
lklimek authored Mar 15, 2024
1 parent 86ba24b commit af64c65
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.8"
version = "0.14.0-dev.9"
name = "tenderdash-abci"
edition = "2021"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion proto-compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.8"
version = "0.14.0-dev.9"
name = "tenderdash-proto-compiler"
authors = ["Informal Systems <[email protected]>", "Dash Core Group"]
edition = "2021"
Expand Down
5 changes: 1 addition & 4 deletions proto-compiler/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,7 @@ pub(crate) fn check_state(dir: &Path, commitish: &str) -> bool {

match read_to_string(state_file) {
Ok(content) => {
println!(
"[info] => Found previously downloaded Tenderdash {}.",
content.trim()
);
println!("[info] => Detected Tenderdash version: {}.", content.trim());
content.eq(commitish)
},
Err(_) => false,
Expand Down
3 changes: 2 additions & 1 deletion proto-compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub fn proto_compile() {
let commitish = tenderdash_commitish();

// check if this commitish is already downloaded
let download = !check_state(&prost_out_dir, &commitish);
let download = std::fs::metadata(tenderdash_dir.join("proto")).is_err()
|| !check_state(&prost_out_dir, &commitish);

if download {
println!("[info] => Fetching {TENDERDASH_REPO} at {commitish} into {tenderdash_dir:?}.");
Expand Down
2 changes: 1 addition & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.8"
version = "0.14.0-dev.9"
name = "tenderdash-proto"
edition = "2021"
license = "Apache-2.0"
Expand Down

0 comments on commit af64c65

Please sign in to comment.