Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1636)

Unified Diff: infra/bots/assets/scripts/download.py

Issue 2069543002: Add asset management scripts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add FYI prints for asset creation Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: infra/bots/assets/scripts/download.py
diff --git a/infra/bots/assets/scripts/download.py b/infra/bots/assets/scripts/download.py
new file mode 100755
index 0000000000000000000000000000000000000000..553a6ec46542295814a6c40f72af153d16dd73fb
--- /dev/null
+++ b/infra/bots/assets/scripts/download.py
@@ -0,0 +1,25 @@
+#!/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.
+
+
+"""Download the current version of the asset."""
+
+
+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)
+
+
+if __name__ == '__main__':
+ assets.main(['download', ASSET_NAME] + sys.argv[1:])
rmistry 2016/06/15 13:47:18 sys.exit(...) here and in all scripts with "if __n
borenet 2016/06/15 14:31:27 I'm not sure what you mean. We'll exit with code
rmistry 2016/06/15 14:49:40 Right, the advantage of using sys.exit is when the

Powered by Google App Engine
This is Rietveld 408576698