From 1b9116f225ecb296c8788e679dd84dd2c63d54e8 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Thu, 26 Mar 2015 17:53:29 +0100 Subject: [PATCH] Add GERRIT_KEY and GERRIT_SERVER options in scripts This allows the user to specify the private key to use to connect to the gerrit server, and to specify which gerrit server to use. Change-Id: I391e9a81350dfc8820d181392574b2cd8f2c3f6a --- genresults-openreviews.sh | 8 ++++++++ genresults-reviewers.sh | 8 ++++++++ genresults-reviews-for-bugs.sh | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/genresults-openreviews.sh b/genresults-openreviews.sh index 311b005..e6601eb 100755 --- a/genresults-openreviews.sh +++ b/genresults-openreviews.sh @@ -17,6 +17,14 @@ if [ -n "${GERRIT_USER}" ] ; then EXTRA_ARGS="-u ${GERRIT_USER}" fi +if [ -n "${GERRIT_KEY}" ]; then + EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" +fi + +if [ -n "${GERRIT_SERVER}" ]; then + EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" +fi + metadata() { date -u echo -n "reviewstats HEAD: " diff --git a/genresults-reviewers.sh b/genresults-reviewers.sh index 12bde1b..95de05d 100755 --- a/genresults-reviewers.sh +++ b/genresults-reviewers.sh @@ -16,6 +16,14 @@ if [ -n "${GERRIT_USER}" ] ; then EXTRA_ARGS="-u ${GERRIT_USER}" fi +if [ -n "${GERRIT_KEY}" ] ; then + EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" +fi + +if [ -n "${GERRIT_SERVER}" ] ; then + EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" +fi + metadata() { date -u echo -n "reviewstats HEAD: " diff --git a/genresults-reviews-for-bugs.sh b/genresults-reviews-for-bugs.sh index 1f7bd40..f5a0a3c 100755 --- a/genresults-reviews-for-bugs.sh +++ b/genresults-reviews-for-bugs.sh @@ -6,6 +6,14 @@ if [ -n "${GERRIT_USER}" ] ; then EXTRA_ARGS="-u ${GERRIT_USER}" fi +if [ -n "${GERRIT_KEY}" ] ; then + EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}" +fi + +if [ -n "${GERRIT_SERVER}" ] ; then + EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}" +fi + metadata() { date -u echo -n "reviewstats HEAD: "