diff options
author | Eric Boren <borenet@google.com> | 2018-07-19 13:27:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-19 17:53:25 +0000 |
commit | 8c172ba397087850e9c4949a42ae558ebc6fdaf4 (patch) | |
tree | ffbda04524e34f8807057334a87241b0f0fac9a0 /infra/bots/assets/lottie-samples/common.py | |
parent | 63fac808ee5a6b33f15de2aa54a507a1334a053e (diff) |
[infra] Add infra support for Lottie
Bug: skia:8136
Change-Id: I18c4ad549c52346ebfe23d172597d5da205e5c4d
Reviewed-on: https://skia-review.googlesource.com/142105
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/assets/lottie-samples/common.py')
-rwxr-xr-x | infra/bots/assets/lottie-samples/common.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/infra/bots/assets/lottie-samples/common.py b/infra/bots/assets/lottie-samples/common.py new file mode 100755 index 0000000000..caa0ad899c --- /dev/null +++ b/infra/bots/assets/lottie-samples/common.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# +# Copyright 2017 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +"""Common vars used by scripts in this directory.""" + + +import os +import sys + +FILE_DIR = os.path.dirname(os.path.abspath(__file__)) +INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir)) + +sys.path.insert(0, INFRA_BOTS_DIR) +from assets import assets + +ASSET_NAME = os.path.basename(FILE_DIR) + + +def run(cmd): + """Run a command, eg. "upload" or "download". """ + assets.main([cmd, ASSET_NAME] + sys.argv[1:]) |