aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/assets/skp/common.py
diff options
context:
space:
mode:
authorGravatar borenet <borenet@chromium.org>2016-07-21 10:27:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-21 10:27:00 -0700
commit85f0e63ca476568143a36242b438390f7e6d5c82 (patch)
treeb5b378c2df8e623c979f123283273139d16a7c9b /infra/bots/assets/skp/common.py
parent95302da19d8b0a3bcd9d9be0e79f486760787f09 (diff)
Add "skp" asset
Don't get rid of SKP_VERSION and associated stuff just yet. BUG=skia:5427 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167763002 DOCS_PREVIEW= https://skia.org/?cl=2167763002 Review-Url: https://codereview.chromium.org/2167763002
Diffstat (limited to 'infra/bots/assets/skp/common.py')
-rwxr-xr-xinfra/bots/assets/skp/common.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/infra/bots/assets/skp/common.py b/infra/bots/assets/skp/common.py
new file mode 100755
index 0000000000..4920c9b4fb
--- /dev/null
+++ b/infra/bots/assets/skp/common.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 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:])