From commits-return-1051-archive-asf-public=cust-asf.ponee.io@yetus.apache.org Thu Feb 22 03:02:59 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D477A18061A for ; Thu, 22 Feb 2018 03:02:58 +0100 (CET) Received: (qmail 9853 invoked by uid 500); 22 Feb 2018 02:02:58 -0000 Mailing-List: contact commits-help@yetus.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@yetus.apache.org Delivered-To: mailing list commits@yetus.apache.org Received: (qmail 9840 invoked by uid 99); 22 Feb 2018 02:02:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2018 02:02:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D4FD9DFC3E; Thu, 22 Feb 2018 02:02:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aajisaka@apache.org To: commits@yetus.apache.org Message-Id: <3afeb824ab1f45a48f273883834c1c8e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: yetus git commit: YETUS-605. jenkins-admin lacks version information Date: Thu, 22 Feb 2018 02:02:57 +0000 (UTC) Repository: yetus Updated Branches: refs/heads/master cdb41916c -> fd124b8a6 YETUS-605. jenkins-admin lacks version information Signed-off-by: Allen Wittenauer Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/fd124b8a Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/fd124b8a Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/fd124b8a Branch: refs/heads/master Commit: fd124b8a6b9935ce7413c6779b00dd10f4ddc594 Parents: cdb4191 Author: Akira Ajisaka Authored: Sun Feb 18 22:42:22 2018 +0900 Committer: Akira Ajisaka Committed: Thu Feb 22 11:02:18 2018 +0900 ---------------------------------------------------------------------- precommit/jenkins/jenkins-admin.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/fd124b8a/precommit/jenkins/jenkins-admin.py ---------------------------------------------------------------------- diff --git a/precommit/jenkins/jenkins-admin.py b/precommit/jenkins/jenkins-admin.py index 62f6e7a..af46556 100755 --- a/precommit/jenkins/jenkins-admin.py +++ b/precommit/jenkins/jenkins-admin.py @@ -130,7 +130,24 @@ if __name__ == '__main__': help='Submit Job to jenkins') parser.add_option('--max-history', dest='history', type='int', help='Maximum history to store', default=5000) + parser.add_option( + '-V', + '--version', + dest='release_version', + action='store_true', + default=False, + help="display version information for jenkins-admin and exit.") + (options, args) = parser.parse_args() + + # Handle the version string right away and exit + if options.release_version: + with open( + os.path.join( + os.path.dirname(__file__), "../../VERSION"), 'r') as ver_file: + print ver_file.read() + sys.exit(0) + tokenFrag = '' if options.jenkinsToken: tokenFrag = 'token=%s' % options.jenkinsToken