@@ -191,16 +191,16 @@ def most_recent_build_date(channel, component):
191
191
192
192
# Read the v1 manifests to find the installer name, download it
193
193
# and extract the version file.
194
- def version_from_channel (channel , component , date ):
194
+ def version_from_channel (channel , component , date_or_sha ):
195
195
dist = dist_folder (component )
196
196
197
197
if component == "cargo" :
198
198
target = "x86_64-unknown-linux-gnu"
199
199
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
201
201
else :
202
202
# 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
204
204
print "downloading " + manifest_url
205
205
response = urllib2 .urlopen (manifest_url )
206
206
if response .getcode () != 200 :
@@ -216,7 +216,7 @@ def version_from_channel(channel, component, date):
216
216
if installer_name == None :
217
217
raise Exception ("couldn't find installer in manifest for " + component )
218
218
219
- installer_url = s3_addy + "/" + dist + "/" + date + "/" + installer_name
219
+ installer_url = s3_addy + "/" + dist + "/" + date_or_sha + "/" + installer_name
220
220
221
221
# Download the installer
222
222
print "downloading " + installer_url
@@ -254,21 +254,6 @@ def dist_folder(component):
254
254
return "cargo-dist"
255
255
return "dist"
256
256
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
-
272
257
def parse_short_version (version ):
273
258
p = re .compile ("^\d*\.\d*\.\d*" )
274
259
m = p .match (version )
0 commit comments