Bug 1259782 - Define zip archive path prefix argument; r=ted

To support generating zip archives with more flexibility.

MozReview-Commit-ID: LmAgAXUfn3x

--HG--
extra : rebase_source : 2b9ddbda0c3dab2a498b2fc217e728a9cfefc134
This commit is contained in:
Gregory Szorc 2016-04-22 11:37:14 -07:00
Родитель 0d7f6fe982
Коммит c5b33d0cbb
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -48,9 +48,12 @@ Be sure to follow these install instructions:
(should be ``Tools (1.2)...`` and the ``Windows 10 SDK``).
Once Visual Studio 2015 Community has been installed, from a checkout
of mozilla-central, run the following to produce a ZIP archive::
of mozilla-central, run something like the following to produce a ZIP
archive::
$ ./mach python build/windows_toolchain.py create-zip vs2015.zip
$ ./mach python build/windows_toolchain.py create-zip vs2015u2
The produced archive will be the argument to ``create-zip`` + ``.zip``.
Firefox for Android with Gradle
===============================

Просмотреть файл

@ -237,13 +237,13 @@ def write_zip(zip_path, prefix=None):
if __name__ == '__main__':
if len(sys.argv) != 3:
print('usage: %s create-zip <filename.zip>' % sys.argv[0])
print('usage: %s create-zip <path-prefix>' % sys.argv[0])
sys.exit(1)
assert sys.argv[1] == 'create-zip'
destzip = sys.argv[2]
# TODO make prefix a CLI argument
write_zip(destzip, prefix='vs2015u1')
prefix = os.path.basename(sys.argv[2])
destzip = '%s.zip' % sys.argv[2]
write_zip(destzip, prefix=prefix)
sha1 = hashlib.sha1()
sha256 = hashlib.sha256()