Bug 1336155 - Update rust repack script for 1.15.0 stable. r=mshal
Revert the bump to beta for the android builders now that 1.15.0
is in stable release.
Generalize the cargo tarball name mangling to use a regular
expression to hand the tiny revision added for the stable
release, as suggested by mshal in
bug 1332759.
MozReview-Commit-ID: 2xZWpvKxY77
--- a/taskcluster/docker/rust-build/repack_rust.py
+++ b/taskcluster/docker/rust-build/repack_rust.py
@@ -1,16 +1,17 @@
#!/bin/env python
'''
This script downloads and repacks official rust language builds
with the necessary tool and target support for the Firefox
build environment.
'''
import os.path
+import re
import sys
import requests
import subprocess
import toml
def fetch_file(url):
@@ -54,17 +55,17 @@ def fetch(url):
def install(filename, target):
'''Run a package's installer script against the given target directory.'''
print(' Unpacking %s...' % filename)
subprocess.check_call(['tar', 'xf', filename])
basename = filename.split('.tar')[0]
# Work around bad tarball naming in 1.15 cargo packages.
basename = basename.replace('cargo-beta', 'cargo-nightly')
- basename = basename.replace('cargo-0.16', 'cargo-nightly')
+ basename = re.sub(r'cargo-0\.[\d\.]+', 'cargo-nightly', basename)
print(' Installing %s...' % basename)
install_cmd = [os.path.join(basename, 'install.sh')]
install_cmd += ['--prefix=' + os.path.abspath(target)]
install_cmd += ['--disable-ldconfig']
subprocess.check_call(install_cmd)
print(' Cleaning %s...' % basename)
subprocess.check_call(['rm', '-rf', basename])
@@ -193,9 +194,9 @@ win64 = "x86_64-pc-windows-msvc"
win32 = "i686-pc-windows-msvc"
if __name__ == '__main__':
repack(mac64, [mac64, mac32])
repack(win32, [win32])
repack(win64, [win64])
repack(linux64, [linux64, linux32])
repack(linux64, [linux64, mac64, mac32], suffix='mac-cross')
- repack(linux64, [linux64, android, android_x86], channel='beta', suffix='android-cross')
+ repack(linux64, [linux64, android, android_x86], suffix='android-cross')