From 5fc9dbf972927f682d3610b2109394181cf9ff05 Mon Sep 17 00:00:00 2001 From: Andy Doan Date: Tue, 3 Nov 2015 15:03:57 -0600 Subject: 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 --- linaro-cp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- cgit v1.2.3