aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/assets
diff options
context:
space:
mode:
authorGravatar borenet <borenet@chromium.org>2016-09-20 07:01:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-20 07:01:23 -0700
commitf44b493cb8dbeb20763479bf30d025ede72032dc (patch)
tree5a15bc28310429a63c298e9116226481cffda5a5 /infra/bots/assets
parent6d7e4e83035845e87c7972af2e7b635c0a5afbb0 (diff)
Fix Win toolchain asset, fix script
Diffstat (limited to 'infra/bots/assets')
-rw-r--r--infra/bots/assets/asset_utils.py7
-rw-r--r--infra/bots/assets/win_toolchain/VERSION2
2 files changed, 7 insertions, 2 deletions
diff --git a/infra/bots/assets/asset_utils.py b/infra/bots/assets/asset_utils.py
index ae58d4539f..74407e25ab 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]
diff --git a/infra/bots/assets/win_toolchain/VERSION b/infra/bots/assets/win_toolchain/VERSION
index d00491fd7e..7813681f5b 100644
--- a/infra/bots/assets/win_toolchain/VERSION
+++ b/infra/bots/assets/win_toolchain/VERSION
@@ -1 +1 @@
-1
+5 \ No newline at end of file