Skip to content
Permalink
Browse files

Remove static usage at compile-time of GIT_INFO to enable builds outs…

…ide of a git repo
  • Loading branch information
larsbergstrom committed Aug 27, 2016
1 parent 8e39313 commit bdf4563c6add01439923e2cf20b5bfe0fc121967
Showing with 8 additions and 3 deletions.
  1. +1 −1 components/script/dom/htmliframeelement.rs
  2. +7 −2 components/util/lib.rs
@@ -355,7 +355,7 @@ unsafe fn build_mozbrowser_event_detail(event: MozBrowserEvent,
type_: Some(DOMString::from(error_type.name())),
description: Some(DOMString::from(description)),
report: Some(DOMString::from(report)),
version: Some(DOMString::from_string(servo_version().into())),
version: Some(DOMString::from_string(servo_version())),
}.to_jsval(cx, rval);
},
MozBrowserEvent::SecurityChange(https_state) => {
@@ -36,6 +36,11 @@ pub mod prefs;
pub mod resource_files;
pub mod thread;

pub fn servo_version() -> &'static str {
concat!("Servo ", env!("CARGO_PKG_VERSION"), env!("GIT_INFO"))
pub fn servo_version() -> String {
let cargo_version = env!("CARGO_PKG_VERSION");
let git_info = option_env!("GIT_INFO");
match git_info {
Some(info) => format!("Servo {}{}", cargo_version, info),
None => format!("Servo {}", cargo_version),
}
}

0 comments on commit bdf4563

Please sign in to comment.
You can’t perform that action at this time.