Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Pulls down the current dart sdk to third_party/dart-sdk/. | 6 """Pulls down the current dart sdk to third_party/dart-sdk/. |
| 7 | 7 |
| 8 You can manually force this to run again by removing | 8 You can manually force this to run again by removing |
| 9 third_party/dart-sdk/STAMP_FILE, which contains the URL of the SDK that | 9 third_party/dart-sdk/STAMP_FILE, which contains the URL of the SDK that |
| 10 was downloaded. Rolling works by updating LINUX_64_SDK to a new URL. | 10 was downloaded. Rolling works by updating LINUX_64_SDK to a new URL. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import os | 13 import os |
| 14 import shutil | 14 import shutil |
| 15 import subprocess | 15 import subprocess |
| 16 import sys | 16 import sys |
| 17 | 17 |
| 18 # How to roll the dart sdk: Just change this url! We write this to the stamp | 18 # How to roll the dart sdk: Just change this url! We write this to the stamp |
| 19 # file after we download, and then check the stamp file for differences. | 19 # file after we download, and then check the stamp file for differences. |
| 20 SDK_URL_BASE = ('http://gsdview.appspot.com/dart-archive/channels/dev/raw/' | 20 SDK_URL_BASE = ('http://gsdview.appspot.com/dart-archive/channels/stable/raw/' |
|
zra
2015/09/03 14:45:29
It looks like sky is on 1.13.0-dev.0.0:
https://g
| |
| 21 '1.12.0-dev.3.1/sdk/') | 21 '1.12.0/sdk/') |
| 22 | 22 |
| 23 LINUX_64_SDK = 'dartsdk-linux-x64-release.zip' | 23 LINUX_64_SDK = 'dartsdk-linux-x64-release.zip' |
| 24 MACOS_64_SDK = 'dartsdk-macos-x64-release.zip' | 24 MACOS_64_SDK = 'dartsdk-macos-x64-release.zip' |
| 25 | 25 |
| 26 # Path constants. (All of these should be absolute paths.) | 26 # Path constants. (All of these should be absolute paths.) |
| 27 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | 27 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 28 MOJO_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) | 28 MOJO_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) |
| 29 DART_SDK_DIR = os.path.join(MOJO_DIR, 'third_party', 'dart-sdk') | 29 DART_SDK_DIR = os.path.join(MOJO_DIR, 'third_party', 'dart-sdk') |
| 30 STAMP_FILE = os.path.join(DART_SDK_DIR, 'STAMP_FILE') | 30 STAMP_FILE = os.path.join(DART_SDK_DIR, 'STAMP_FILE') |
| 31 LIBRARIES_FILE = os.path.join(DART_SDK_DIR,'dart-sdk', | 31 LIBRARIES_FILE = os.path.join(DART_SDK_DIR,'dart-sdk', |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 | 92 |
| 93 unzip_command = ['unzip', '-o', '-q', output_file, '-d', DART_SDK_DIR] | 93 unzip_command = ['unzip', '-o', '-q', output_file, '-d', DART_SDK_DIR] |
| 94 if not RunCommand(unzip_command, fail_hard=False): | 94 if not RunCommand(unzip_command, fail_hard=False): |
| 95 print "Failed to unzip the dart sdk." | 95 print "Failed to unzip the dart sdk." |
| 96 return 1 | 96 return 1 |
| 97 | 97 |
| 98 return 0 | 98 return 0 |
| 99 | 99 |
| 100 if __name__ == '__main__': | 100 if __name__ == '__main__': |
| 101 sys.exit(main()) | 101 sys.exit(main()) |
| OLD | NEW |