Chromium Code Reviews| Index: infra/bots/assets/scripts/upload.py |
| diff --git a/infra/bots/assets/scripts/upload.py b/infra/bots/assets/scripts/upload.py |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..686f66c0afbfc8b6bb94127c90305d0839a40a76 |
| --- /dev/null |
| +++ b/infra/bots/assets/scripts/upload.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. |
| + |
| + |
| +"""Upload a new 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) |
|
rmistry
2016/06/15 13:47:18
The top 4 lines are in 3 scripts. Might be able to
borenet
2016/06/15 14:31:27
Extracted into common.py, no function needed. It
|
| +from assets import assets |
| + |
| +ASSET_NAME = os.path.basename(FILE_DIR) |
| + |
| + |
| +if __name__ == '__main__': |
| + assets.main(['upload', ASSET_NAME] + sys.argv[1:]) |