OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 import argparse | 6 import argparse |
7 import os | 7 import os |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 import tempfile | 10 import tempfile |
11 import time | 11 import time |
12 import zipfile | 12 import zipfile |
13 | 13 |
| 14 import add_sdk_tools_to_path |
14 from mopy.config import Config | 15 from mopy.config import Config |
15 from mopy.paths import Paths | 16 from mopy.paths import Paths |
16 from mopy.version import Version | 17 |
| 18 from mopy_internal.version import Version |
17 | 19 |
18 paths = Paths(Config(target_os=Config.OS_LINUX, is_debug=False)) | 20 paths = Paths(Config(target_os=Config.OS_LINUX, is_debug=False)) |
19 | 21 |
20 sys.path.insert(0, os.path.join(paths.src_root, "tools")) | 22 sys.path.insert(0, os.path.join(paths.src_root, "tools")) |
21 # pylint: disable=F0401 | 23 # pylint: disable=F0401 |
22 import find_depot_tools | 24 import find_depot_tools |
23 | 25 |
24 depot_tools_path = find_depot_tools.add_depot_tools_to_path() | 26 depot_tools_path = find_depot_tools.add_depot_tools_to_path() |
25 gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil") | 27 gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil") |
26 | 28 |
(...skipping 21 matching lines...) Expand all Loading... |
48 parser.add_argument("-n", "--dry_run", help="Dry run, do not actually "+ | 50 parser.add_argument("-n", "--dry_run", help="Dry run, do not actually "+ |
49 "upload", action="store_true") | 51 "upload", action="store_true") |
50 parser.add_argument("-v", "--verbose", help="Verbose mode", | 52 parser.add_argument("-v", "--verbose", help="Verbose mode", |
51 action="store_true") | 53 action="store_true") |
52 args = parser.parse_args() | 54 args = parser.parse_args() |
53 upload(args.dry_run, args.verbose) | 55 upload(args.dry_run, args.verbose) |
54 return 0 | 56 return 0 |
55 | 57 |
56 if __name__ == "__main__": | 58 if __name__ == "__main__": |
57 sys.exit(main()) | 59 sys.exit(main()) |
OLD | NEW |