diff options
author | Andy Doan <andy.doan@linaro.org> | 2015-11-03 15:03:57 -0600 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2015-11-03 15:03:57 -0600 |
commit | 5fc9dbf972927f682d3610b2109394181cf9ff05 (patch) | |
tree | 92b6fd50b55ece50e53c34d6438e73c37ae4ee2f | |
parent | be1eac5f2c052c3bc6eb0fd4c2ab43b8674cdb23 (diff) |
Allow v3 API to be used from a jenkins job
When the PUBLISH_TOKEN is set we are forcing v2 even if the caller
specifies -v3.
Change-Id: I682b6e6b6ca8be53ddf6a5f87ce069aa8ce4fe13
-rwxr-xr-x | linaro-cp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linaro-cp.py b/linaro-cp.py index 5819211..459e2c0 100755 --- a/linaro-cp.py +++ b/linaro-cp.py @@ -234,7 +234,8 @@ def main(): key = arguments.key else: key = os.environ.get('PUBLISH_TOKEN') - if key: + if key and arguments.api_version == '1': + # Default to api v2 if not specified arguments.api_version = '2' else: key = os.environ.get('PUBLISH_KEY') |