Skip to content
Merged
Show file tree
Hide file tree
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
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