Move compile-time build info to aiken-project
So that we can use it as part of the blueprints.
This commit is contained in:
@@ -116,3 +116,19 @@ impl Config {
|
||||
Some(self)
|
||||
}
|
||||
}
|
||||
|
||||
mod built_info {
|
||||
include!(concat!(env!("OUT_DIR"), "/built.rs"));
|
||||
}
|
||||
|
||||
pub fn compiler_version(include_commit_hash: bool) -> String {
|
||||
if include_commit_hash {
|
||||
format!(
|
||||
"v{} {}",
|
||||
built_info::PKG_VERSION_MAJOR,
|
||||
built_info::GIT_COMMIT_HASH_SHORT.unwrap_or("unknown")
|
||||
)
|
||||
} else {
|
||||
format!("v{}", built_info::PKG_VERSION_MAJOR,)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user