Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: infra/bots/assets/asset_utils.py

Issue 2351033004: Fix Win toolchain asset, fix script (Closed)
Patch Set: Fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | infra/bots/assets/win_toolchain/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/assets/asset_utils.py
diff --git a/infra/bots/assets/asset_utils.py b/infra/bots/assets/asset_utils.py
index ae58d4539fbcf30fe55246daf4d3b8de41adc034..74407e25abaa19e0fe42792904580617b1422680 100644
--- a/infra/bots/assets/asset_utils.py
+++ b/infra/bots/assets/asset_utils.py
@@ -38,6 +38,8 @@ TAG_PROJECT_SKIA = 'project:skia'
TAG_VERSION_PREFIX = 'version:'
TAG_VERSION_TMPL = '%s%%s' % TAG_VERSION_PREFIX
+WHICH = 'where' if sys.platform.startswith('win') else 'which'
+
VERSION_FILENAME = 'VERSION'
ZIP_BLACKLIST = ['.git', '.svn', '*.pyc', '.DS_STORE']
@@ -146,7 +148,10 @@ class CIPDStore(object):
class GSStore(object):
"""Wrapper object for interacting with Google Storage."""
def __init__(self, gsutil=None, bucket=DEFAULT_GS_BUCKET):
- gsutil = os.path.abspath(gsutil) if gsutil else 'gsutil'
+ if gsutil:
+ gsutil = os.path.abspath(gsutil)
+ else:
+ gsutil = subprocess.check_output([WHICH, 'gsutil']).rstrip()
self._gsutil = [gsutil]
if gsutil.endswith('.py'):
self._gsutil = ['python', gsutil]
« no previous file with comments | « no previous file | infra/bots/assets/win_toolchain/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698