mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Get rustc commit hash from channel manifest
… added in https://github.com/rust-lang/rust/pull/44218, instead of using the GitHub API.
This commit is contained in:
parent
6c6ce53c3d
commit
f59bcc0064
1 changed files with 1 additions and 5 deletions
|
@ -90,12 +90,8 @@ class MachCommands(CommandBase):
|
||||||
base_url = static_s3
|
base_url = static_s3
|
||||||
else:
|
else:
|
||||||
import toml
|
import toml
|
||||||
import re
|
|
||||||
channel = "%s/%s/channel-rust-nightly.toml" % (static_s3, self.rust_nightly_date())
|
channel = "%s/%s/channel-rust-nightly.toml" % (static_s3, self.rust_nightly_date())
|
||||||
version_string = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["version"]
|
nightly_commit_hash = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["git_commit_hash"]
|
||||||
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"]
|
|
||||||
|
|
||||||
base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds"
|
base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds"
|
||||||
if not self.config["build"]["llvm-assertions"]:
|
if not self.config["build"]["llvm-assertions"]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue