Skip to content

Commit

Permalink
Auto merge of #39750 - alexcrichton:beta-next, r=brson
Browse files Browse the repository at this point in the history
[beta] Another round of backporting PRs to beta

This is a backport of the following PRs:

* #39622
* #39630
* #39660
* #39676
  • Loading branch information
bors committed Feb 16, 2017
2 parents 9e272fa + f51adf9 commit bc15d52
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.16.0
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
# NB Make sure it starts with a dot to conform to semver pre-release
# versions (section 9)
CFG_PRERELEASE_VERSION=.1
CFG_PRERELEASE_VERSION=.2

ifeq ($(CFG_RELEASE_CHANNEL),stable)
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use Build;
pub fn clean(build: &Build) {
rm_rf(build, "tmp".as_ref());
rm_rf(build, &build.out.join("tmp"));
rm_rf(build, &build.out.join("dist"));

for host in build.config.host.iter() {
let entries = match build.out.join(host).read_dir() {
Expand Down
20 changes: 15 additions & 5 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
extern crate toml;
extern crate rustc_serialize;

use std::collections::HashMap;
use std::collections::{BTreeMap, HashMap};
use std::env;
use std::fs::File;
use std::io::{self, Read, Write};
Expand Down Expand Up @@ -95,7 +95,6 @@ static MINGW: &'static [&'static str] = &[
"x86_64-pc-windows-gnu",
];

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

self.digest_and_sign();
let manifest = self.build_manifest();
let manifest = toml::encode(&manifest).to_string();
let Manifest { manifest_version, date, pkg } = self.build_manifest();

// Unfortunately we can't use derive(RustcEncodable) here because the
// version field is called `manifest-version`, not `manifest_version`.
// In lieu of that just create the table directly here with a `BTreeMap`
// and wrap it up in a `Value::Table`.
let mut manifest = BTreeMap::new();
manifest.insert("manifest-version".to_string(),
toml::Value::String(manifest_version));
manifest.insert("date".to_string(), toml::Value::String(date));
manifest.insert("pkg".to_string(), toml::encode(&pkg));
let manifest = toml::Value::Table(manifest).to_string();

let filename = format!("channel-rust-{}.toml", self.channel);
self.write_manifest(&manifest, &filename);
Expand Down Expand Up @@ -352,7 +361,8 @@ impl Builder {
fn hash(&self, path: &Path) -> String {
let sha = t!(Command::new("shasum")
.arg("-a").arg("256")
.arg(path)
.arg(path.file_name().unwrap())
.current_dir(path.parent().unwrap())
.output());
assert!(sha.status.success());

Expand Down

0 comments on commit bc15d52

Please sign in to comment.