Bug 1406006 - Get well formatted commit hash and commit date when building geckodriver. r?whimboo
MozReview-Commit-ID: 7h6RuMseOYA
--- a/testing/geckodriver/build.rs
+++ b/testing/geckodriver/build.rs
@@ -27,25 +27,25 @@ fn main() {
writeln!(
fh,
"const COMMIT_DATE: Option<&'static str> = {:?};",
commit_date()
).unwrap();
}
fn commit_hash() -> Option<String> {
- exec(&"hg", &["log", "-r.", "-T '{node|short}'"]).or_else(
+ exec(&"hg", &["log", "-r.", "-T{node|short}"]).or_else(
|| {
exec(&"git", &["rev-parse", "HEAD"]).and_then(hg2git_sha)
},
)
}
fn commit_date() -> Option<String> {
- exec(&"hg", &["log", "-r.", "-T '{date|isodate}'"]).or_else(|| {
+ exec(&"hg", &["log", "-r.", "-T{date|isodate}"]).or_else(|| {
exec(
&"git",
&["log", "-1", "--date=short", "--pretty=format:%cd"],
)
})
}
fn exec<S, I>(program: S, args: I) -> Option<String>