diff options
author | Eric Boren <borenet@google.com> | 2017-02-17 14:09:44 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-17 19:55:12 +0000 |
commit | 310f4d02c1e2d01181c1db18acf05f2846f94cd4 (patch) | |
tree | 2e2a04af053bf1a5aed874ede98258ab7ceb6e9a /infra/bots/recipes/swarm_presubmit.py | |
parent | 25272096bdc0ceed8de49aa9310feb7cc3ea3744 (diff) |
Roll Recipe DEPS
BUG=skia:
Change-Id: I3e32207e5809e126d53ee8ec2158eb855c1a26d2
Reviewed-on: https://skia-review.googlesource.com/8671
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'infra/bots/recipes/swarm_presubmit.py')
-rw-r--r-- | infra/bots/recipes/swarm_presubmit.py | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/infra/bots/recipes/swarm_presubmit.py b/infra/bots/recipes/swarm_presubmit.py index 6a3f52bfa5..940591e426 100644 --- a/infra/bots/recipes/swarm_presubmit.py +++ b/infra/bots/recipes/swarm_presubmit.py @@ -21,33 +21,27 @@ def RunSteps(api): api.vars.setup() api.core.checkout_steps() - # git-cl wants us to be on a branch. - branch = 'tmp_%s' % api.uuid.random() - api.step('create git branch', - cmd=['git', 'checkout', '-b', branch], - cwd=api.vars.skia_dir) - try: - api.step('git status', - cmd=['git', 'status'], - cwd=api.vars.skia_dir) - - depot_tools_path = api.depot_tools.package_repo_resource() - env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} - api.step('presubmit', - cmd=['git', 'cl', 'presubmit', '--force', '-v', '-v'], - cwd=api.vars.skia_dir, - env=env) - finally: - api.step('git reset', - cmd=['git', 'reset', '--hard', 'origin/master'], - cwd=api.vars.skia_dir) - api.step('checkout origin/master', - cmd=['git', 'checkout', 'origin/master'], - cwd=api.vars.skia_dir) - api.step('delete git branch', - cmd=['git', 'branch', '-D', branch], - cwd=api.vars.skia_dir) - + with api.step.context({'cwd': api.vars.skia_dir}): + # git-cl wants us to be on a branch. + branch = 'tmp_%s' % api.uuid.random() + api.step('create git branch', + cmd=['git', 'checkout', '-b', branch]) + try: + api.step('git status', + cmd=['git', 'status']) + + depot_tools_path = api.depot_tools.package_repo_resource() + env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} + api.step('presubmit', + cmd=['git', 'cl', 'presubmit', '--force', '-v', '-v'], + env=env) + finally: + api.step('git reset', + cmd=['git', 'reset', '--hard', 'origin/master']) + api.step('checkout origin/master', + cmd=['git', 'checkout', 'origin/master']) + api.step('delete git branch', + cmd=['git', 'branch', '-D', branch]) def GenTests(api): |