Skip to content

Commit bc15d52

Browse files
committed
Auto merge of #39750 - alexcrichton:beta-next, r=brson
[beta] Another round of backporting PRs to beta This is a backport of the following PRs: * #39622 * #39630 * #39660 * #39676
2 parents 9e272fa + f51adf9 commit bc15d52

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.16.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.1
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2424
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"

src/bootstrap/clean.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use Build;
2424
pub fn clean(build: &Build) {
2525
rm_rf(build, "tmp".as_ref());
2626
rm_rf(build, &build.out.join("tmp"));
27+
rm_rf(build, &build.out.join("dist"));
2728

2829
for host in build.config.host.iter() {
2930
let entries = match build.out.join(host).read_dir() {

src/tools/build-manifest/src/main.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
extern crate toml;
1212
extern crate rustc_serialize;
1313

14-
use std::collections::HashMap;
14+
use std::collections::{BTreeMap, HashMap};
1515
use std::env;
1616
use std::fs::File;
1717
use std::io::{self, Read, Write};
@@ -95,7 +95,6 @@ static MINGW: &'static [&'static str] = &[
9595
"x86_64-pc-windows-gnu",
9696
];
9797

98-
#[derive(RustcEncodable)]
9998
struct Manifest {
10099
manifest_version: String,
101100
date: String,
@@ -171,8 +170,18 @@ impl Builder {
171170
self.cargo_version = self.version("cargo", "x86_64-unknown-linux-gnu");
172171

173172
self.digest_and_sign();
174-
let manifest = self.build_manifest();
175-
let manifest = toml::encode(&manifest).to_string();
173+
let Manifest { manifest_version, date, pkg } = self.build_manifest();
174+
175+
// Unfortunately we can't use derive(RustcEncodable) here because the
176+
// version field is called `manifest-version`, not `manifest_version`.
177+
// In lieu of that just create the table directly here with a `BTreeMap`
178+
// and wrap it up in a `Value::Table`.
179+
let mut manifest = BTreeMap::new();
180+
manifest.insert("manifest-version".to_string(),
181+
toml::Value::String(manifest_version));
182+
manifest.insert("date".to_string(), toml::Value::String(date));
183+
manifest.insert("pkg".to_string(), toml::encode(&pkg));
184+
let manifest = toml::Value::Table(manifest).to_string();
176185

177186
let filename = format!("channel-rust-{}.toml", self.channel);
178187
self.write_manifest(&manifest, &filename);
@@ -352,7 +361,8 @@ impl Builder {
352361
fn hash(&self, path: &Path) -> String {
353362
let sha = t!(Command::new("shasum")
354363
.arg("-a").arg("256")
355-
.arg(path)
364+
.arg(path.file_name().unwrap())
365+
.current_dir(path.parent().unwrap())
356366
.output());
357367
assert!(sha.status.success());
358368

0 commit comments

Comments
 (0)