| 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 imp | 7 import imp |
| 8 import os | 8 import os |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 print "Only support linux for now" | 31 print "Only support linux for now" |
| 32 sys.exit(1) | 32 sys.exit(1) |
| 33 | 33 |
| 34 root_path = os.path.realpath( | 34 root_path = os.path.realpath( |
| 35 os.path.join( | 35 os.path.join( |
| 36 os.path.dirname( | 36 os.path.dirname( |
| 37 os.path.realpath(__file__)), | 37 os.path.realpath(__file__)), |
| 38 os.pardir, | 38 os.pardir, |
| 39 os.pardir)) | 39 os.pardir)) |
| 40 | 40 |
| 41 find_depot_tools_path = os.path.join(root_path, "tools", "find_depot_tools.py") | 41 find_depot_tools_path = os.path.join(root_path, "build", "find_depot_tools.py") |
| 42 find_depot_tools = imp.load_source("find_depot_tools", find_depot_tools_path) | 42 find_depot_tools = imp.load_source("find_depot_tools", find_depot_tools_path) |
| 43 | 43 |
| 44 depot_tools_path = find_depot_tools.add_depot_tools_to_path() | 44 depot_tools_path = find_depot_tools.add_depot_tools_to_path() |
| 45 gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil") | 45 gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil") |
| 46 | 46 |
| 47 def get_version_name(custom_build): | 47 def get_version_name(custom_build): |
| 48 if custom_build: | 48 if custom_build: |
| 49 branch = subprocess.check_output( | 49 branch = subprocess.check_output( |
| 50 ["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd=root_path).strip() | 50 ["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd=root_path).strip() |
| 51 try: | 51 try: |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 "android-arm", args.dry_run) | 175 "android-arm", args.dry_run) |
| 176 | 176 |
| 177 if not args.dry_run: | 177 if not args.dry_run: |
| 178 print "Uploaded artifacts for version %s" % (version_name, ) | 178 print "Uploaded artifacts for version %s" % (version_name, ) |
| 179 else: | 179 else: |
| 180 print "No artifacts uploaded (dry run)" | 180 print "No artifacts uploaded (dry run)" |
| 181 return 0 | 181 return 0 |
| 182 | 182 |
| 183 if __name__ == '__main__': | 183 if __name__ == '__main__': |
| 184 sys.exit(main()) | 184 sys.exit(main()) |
| OLD | NEW |