aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-09-08 12:00:30 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-09-12 11:42:11 +0200
commitf59bcc006451d7a71d8432ebebf6044001512d0e (patch)
treea5a23a39753086f37da6853ecc825ec472fabd8d /python/servo/bootstrap_commands.py
parent6c6ce53c3d3d36da02da1ce094a7bab0ea80a3f6 (diff)
downloadservo-f59bcc006451d7a71d8432ebebf6044001512d0e.tar.gz
servo-f59bcc006451d7a71d8432ebebf6044001512d0e.zip
Get rustc commit hash from channel manifest
… added in https://github.com/rust-lang/rust/pull/44218, instead of using the GitHub API.
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py6
1 files changed, 1 insertions, 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"]: