Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit 9440b8a

Browse files
author
Someone on the Dev Buildmaster
committed
Cleanup
1 parent 1aa2dbc commit 9440b8a

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

master/build-rust-manifest.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,16 @@ def most_recent_build_date(channel, component):
191191

192192
# Read the v1 manifests to find the installer name, download it
193193
# and extract the version file.
194-
def version_from_channel(channel, component, date):
194+
def version_from_channel(channel, component, date_or_sha):
195195
dist = dist_folder(component)
196196

197197
if component == "cargo":
198198
target = "x86_64-unknown-linux-gnu"
199199
installer_name = "cargo-nightly-" + target + ".tar.gz"
200-
installer_url = cargo_addy + "/" + date + "/" + installer_name
200+
installer_url = cargo_addy + "/" + date_or_sha + "/" + installer_name
201201
else:
202202
# Load the manifest
203-
manifest_url = s3_addy + "/" + dist + "/" + date + "/channel-" + component + "-" + channel
203+
manifest_url = s3_addy + "/" + dist + "/" + date_or_sha + "/channel-" + component + "-" + channel
204204
print "downloading " + manifest_url
205205
response = urllib2.urlopen(manifest_url)
206206
if response.getcode() != 200:
@@ -216,7 +216,7 @@ def version_from_channel(channel, component, date):
216216
if installer_name == None:
217217
raise Exception("couldn't find installer in manifest for " + component)
218218

219-
installer_url = s3_addy + "/" + dist + "/" + date + "/" + installer_name
219+
installer_url = s3_addy + "/" + dist + "/" + date_or_sha + "/" + installer_name
220220

221221
# Download the installer
222222
print "downloading " + installer_url
@@ -254,21 +254,6 @@ def dist_folder(component):
254254
return "cargo-dist"
255255
return "dist"
256256

257-
def cargo_rev_from_packaging(rustc_version):
258-
print "downloading " + cargo_revs
259-
response = urllib2.urlopen(cargo_revs)
260-
if response.getcode() != 200:
261-
raise Exception("couldn't download " + cargo_revs)
262-
revs = response.read().strip()
263-
for line in revs.split("\n"):
264-
values = line.split(":")
265-
version = values[0].strip()
266-
date = values[1].strip()
267-
if version == rustc_version:
268-
return date
269-
raise Exception("couldn't find cargo rev for " + rustc_version)
270-
271-
272257
def parse_short_version(version):
273258
p = re.compile("^\d*\.\d*\.\d*")
274259
m = p.match(version)

0 commit comments

Comments
 (0)