aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/sync
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-10-25 11:04:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-25 16:15:12 +0000
commit23510f2c293813bea01f389ae189af28d38d9bd3 (patch)
treead7b40858f1830dde39ce6a3315adb9ea2d23edc /bin/sync
parent9feb6326d0c5407247ed1e3d8fade2f86b233001 (diff)
bin/sync: call fetch-gn when DEPS changes
Change-Id: Ifb2a364df1a8817152a2c1e79748d14534a9e523 Reviewed-on: https://skia-review.googlesource.com/3904 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'bin/sync')
-rwxr-xr-xbin/sync19
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/sync b/bin/sync
index 34bfc643f4..154acbc300 100755
--- a/bin/sync
+++ b/bin/sync
@@ -68,17 +68,18 @@ if current_deps_hash != deps_hash:
if not os.path.isfile('.gclient'):
with open('.gclient', 'w') as o:
o.write(default_gclient_config)
- gclient_sync_command = [gclient, 'sync'] + skia_opt_deps
- try:
- sys.stdout.write('%r\n' % gclient_sync_command)
- subprocess.check_call(gclient_sync_command)
- except:
- sys.stderr.write('\n`gclient sync` failed.\n')
+ for command in [[gclient, 'sync'] + skia_opt_deps,
+ ['python', os.path.join('bin', 'fetch-gn')]]:
try:
- os.remove('.deps_sha1') # Unknown state.
+ sys.stdout.write('%r\n' % command)
+ subprocess.check_call(command)
except:
- pass
- exit(1)
+ sys.stderr.write('\n%r failed.\n' % command)
+ try:
+ os.remove('.deps_sha1') # Unknown state.
+ except:
+ pass
+ exit(1)
# Only write hash after a successful sync.
with open('.deps_sha1', 'w') as o:
o.write(deps_hash)