Skip to content

Attempt to fix nightly manifests #40111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ impl Builder {
self.package("rust-docs", &mut manifest.pkg, TARGETS);
self.package("rust-src", &mut manifest.pkg, &["*"]);

if self.channel == "rust-nightly" {
self.package("analysis", &mut manifest.pkg, TARGETS);
if self.channel == "nightly" {
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
}

let mut pkg = Package {
Expand Down Expand Up @@ -283,7 +283,7 @@ impl Builder {
pkg.target.insert(host.to_string(), Target {
available: true,
url: Some(self.url("rust", host)),
hash: Some(to_hex(digest.as_ref())),
hash: Some(digest),
components: Some(components),
extensions: Some(extensions),
});
Expand Down Expand Up @@ -409,19 +409,3 @@ impl Builder {
self.sign(&dst);
}
}

fn to_hex(digest: &[u8]) -> String {
let mut ret = String::new();
for byte in digest {
ret.push(hex((byte & 0xf0) >> 4));
ret.push(hex(byte & 0xf));
}
return ret;

fn hex(b: u8) -> char {
match b {
0...9 => (b'0' + b) as char,
_ => (b'a' + b - 10) as char,
}
}
}