From f59bcc006451d7a71d8432ebebf6044001512d0e Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 8 Sep 2017 12:00:30 +0200 Subject: [PATCH] Get rustc commit hash from channel manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … added in https://github.com/rust-lang/rust/pull/44218, instead of using the GitHub API. --- python/servo/bootstrap_commands.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index dfb88b74272..edaad4f6dbb 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -90,12 +90,8 @@ class MachCommands(CommandBase): base_url = static_s3 else: import toml - import re channel = "%s/%s/channel-rust-nightly.toml" % (static_s3, self.rust_nightly_date()) - version_string = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["version"] - short_commit = re.search("\(([0-9a-f]+) ", version_string).group(1) - commit_api = "https://api.github.com/repos/rust-lang/rust/commits/" + short_commit - nightly_commit_hash = json.load(urllib2.urlopen(commit_api))["sha"] + nightly_commit_hash = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["git_commit_hash"] base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds" if not self.config["build"]["llvm-assertions"]: