Skip to content

Commit

Permalink
feat: use TENDERDASH_COMMITISH env var to set tenderdash rev to use (#44
Browse files Browse the repository at this point in the history
)

* fix: use TENDERDASH_COMMITISH env var if set

* chore: fix nightly build issues
  • Loading branch information
lklimek authored Dec 14, 2023
1 parent f413119 commit 865fd05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ use std::env;
fn main() {
let version = env!("CARGO_PKG_VERSION");

env::set_var("TENDERDASH_COMMITISH", "v".to_owned() + version);
// check if TENDERDASH_COMMITISH is alrady set; if not, set it to the current
// version
let commitish = env::var("TENDERDASH_COMMITISH").unwrap_or_default();
if commitish.is_empty() {
env::set_var("TENDERDASH_COMMITISH", "v".to_owned() + version);
}

tenderdash_proto_compiler::proto_compile();

println!("cargo:rerun-if-changed=../proto-compiler/src");
println!("cargo:rerun-if-changed=Cargo.toml");
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION");
println!("cargo:rerun-if-env-changed=TENDERDASH_COMMITISH");
}
1 change: 1 addition & 0 deletions proto/src/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Re-export according to alloc::prelude::v1 because it is not yet stabilized
// https://doc.rust-lang.org/src/alloc/prelude/v1.rs.html
#[allow(unused_imports)]
pub use alloc::{
borrow::ToOwned,
boxed::Box,
Expand Down

0 comments on commit 865fd05

Please sign in to comment.