Improve crate descriptors to be more cargo-friendly (#1844)
* Update secp dependency to use crates.io version * Add more details to various Cargo.toml * Remove use of env variables that aren't reliably provided by cargo
This commit is contained in:
+4
-7
@@ -52,30 +52,27 @@ pub mod built_info {
|
||||
include!(concat!(env!("OUT_DIR"), "/built.rs"));
|
||||
}
|
||||
|
||||
pub fn info_strings() -> (String, String, String) {
|
||||
pub fn info_strings() -> (String, String) {
|
||||
(
|
||||
format!(
|
||||
"This is Grin version {}{}, built for {} by {}.",
|
||||
built_info::PKG_VERSION,
|
||||
built_info::GIT_VERSION.map_or_else(|| "".to_owned(), |v| format!(" (git {})", v)),
|
||||
built_info::TARGET,
|
||||
built_info::RUSTC_VERSION
|
||||
built_info::RUSTC_VERSION,
|
||||
).to_string(),
|
||||
format!(
|
||||
"Built with profile \"{}\", features \"{}\" on {}.",
|
||||
"Built with profile \"{}\", features \"{}\".",
|
||||
built_info::PROFILE,
|
||||
built_info::FEATURES_STR,
|
||||
built_info::BUILT_TIME_UTC
|
||||
).to_string(),
|
||||
format!("Dependencies:\n {}", built_info::DEPENDENCIES_STR).to_string(),
|
||||
)
|
||||
}
|
||||
|
||||
fn log_build_info() {
|
||||
let (basic_info, detailed_info, deps) = info_strings();
|
||||
let (basic_info, detailed_info) = info_strings();
|
||||
info!("{}", basic_info);
|
||||
debug!("{}", detailed_info);
|
||||
trace!("{}", deps);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -31,7 +31,7 @@ pub struct TUIVersionView;
|
||||
impl TUIStatusListener for TUIVersionView {
|
||||
/// Create basic status view
|
||||
fn create() -> Box<View> {
|
||||
let (basic_info, detailed_info, _) = info_strings();
|
||||
let (basic_info, detailed_info) = info_strings();
|
||||
let basic_status_view = BoxView::with_full_screen(
|
||||
LinearLayout::new(Orientation::Vertical)
|
||||
.child(TextView::new(basic_info))
|
||||
|
||||
+3
-2
@@ -53,11 +53,12 @@ fn main() {
|
||||
// build and versioning information
|
||||
let mut opts = built::Options::default();
|
||||
opts.set_dependencies(true);
|
||||
built::write_built_file_with_opts(
|
||||
// don't fail the build if something's missing, may just be cargo release
|
||||
let _ = built::write_built_file_with_opts(
|
||||
&opts,
|
||||
env!("CARGO_MANIFEST_DIR"),
|
||||
format!("{}{}", env::var("OUT_DIR").unwrap(), "/built.rs"),
|
||||
).expect("Failed to acquire build-time information");
|
||||
);
|
||||
|
||||
install_web_wallet();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user