mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Fix the abi dills download script
Bug: https://github.com/dart-lang/sdk/issues/36047 Change-Id: Ic8b6cb0b1b5cb026bc06dd2ff414c026700a7c5e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96133 Commit-Queue: Liam Appelbe <liama@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
8f03ae05ff
commit
ed1f956991
2 changed files with 13 additions and 6 deletions
3
tools/.gitignore
vendored
3
tools/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
# tools/idl_parser is populated by gclient sync
|
||||
# tools/idl_parser and tools/abiversions are populated by gclient sync
|
||||
abiversions
|
||||
idl_parser
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Downloads dill files from CIPD for each supported ABI version.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import utils
|
||||
|
@ -8,12 +9,17 @@ import utils
|
|||
def main():
|
||||
abi_version = int(utils.GetAbiVersion())
|
||||
oldest_abi_version = int(utils.GetOldestSupportedAbiVersion())
|
||||
cmd = ['cipd', 'ensure', '-root', 'tools/abiversions', '-ensure-file', '-']
|
||||
ensure_file = ''
|
||||
for i in xrange(oldest_abi_version, abi_version):
|
||||
cmd = ['cipd', 'install', 'dart/abiversions/%d' % i, 'latest']
|
||||
result = subprocess.call(cmd)
|
||||
if result != 0:
|
||||
return 1
|
||||
return 0
|
||||
ensure_file += '@Subdir %d\ndart/abiversions/%d latest\n\n' % (i, i)
|
||||
p = subprocess.Popen(cmd,
|
||||
stdin = subprocess.PIPE,
|
||||
shell = utils.IsWindows(),
|
||||
cwd = utils.DART_DIR)
|
||||
p.communicate(ensure_file)
|
||||
p.stdin.close()
|
||||
return p.wait()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue