diff options
| author | bors <bors@rust-lang.org> | 2018-02-06 19:28:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-02-06 19:28:54 +0000 |
| commit | bd98fe0c05601d8a318a709adc4263f3348ea8d4 (patch) | |
| tree | 6f6f45f6da609c2c34e0cedb81f08a7f5bd5a8aa /src/bootstrap | |
| parent | ca7d839088cbfe5b9bf232f5c27c48703d4f1605 (diff) | |
| parent | 7f0e87a781b449f463b4238d5d08c59056127e3d (diff) | |
Auto merge of #48040 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests - Successful merges: #46962, #47986, #48012, #48013, #48026, #48031, #48036 - Failed merges:
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/bootstrap/dist.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/lib.rs | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index bbbbf0e1915..2d478341317 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -41,3 +41,4 @@ serde_derive = "1.0.8" serde_json = "1.0.2" toml = "0.4" lazy_static = "0.2" +time = "0.1" diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index dbb7d19e432..6717b1cb098 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -33,6 +33,7 @@ use builder::{Builder, RunConfig, ShouldRun, Step}; use compile; use tool::{self, Tool}; use cache::{INTERNER, Interned}; +use time; pub fn pkgname(build: &Build, component: &str) -> String { if component == "cargo" { @@ -445,8 +446,7 @@ impl Step for Rustc { t!(fs::create_dir_all(image.join("share/man/man1"))); let man_src = build.src.join("src/doc/man"); let man_dst = image.join("share/man/man1"); - let date_output = output(Command::new("date").arg("+%B %Y")); - let month_year = date_output.trim(); + let month_year = t!(time::strftime("%B %Y", &time::now())); // don't use our `bootstrap::util::{copy, cp_r}`, because those try // to hardlink, and we don't want to edit the source templates for entry_result in t!(fs::read_dir(man_src)) { @@ -456,7 +456,7 @@ impl Step for Rustc { t!(fs::copy(&page_src, &page_dst)); // template in month/year and version number replace_in_file(&page_dst, - &[("<INSERT DATE HERE>", month_year), + &[("<INSERT DATE HERE>", &month_year), ("<INSERT VERSION HERE>", channel::CFG_RELEASE_NUM)]); } diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index f2a7ce30c8a..a84a6a8990b 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -130,6 +130,7 @@ extern crate cc; extern crate getopts; extern crate num_cpus; extern crate toml; +extern crate time; #[cfg(unix)] extern crate libc; |
