From 344bea94fa19e3dfb67d26c6289ad2cd9da4d312 Mon Sep 17 00:00:00 2001 From: Jakub Stransky Date: Sun, 27 Dec 2020 14:30:35 +0100 Subject: [PATCH 1/2] make spin cli configuration optional --- scripts/expose/configure_iap.sh | 9 +++++---- scripts/install/setup_properties.sh | 2 ++ scripts/manage/add_missing_properties.sh | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/expose/configure_iap.sh b/scripts/expose/configure_iap.sh index edd5be8..c4f6bb5 100755 --- a/scripts/expose/configure_iap.sh +++ b/scripts/expose/configure_iap.sh @@ -20,6 +20,7 @@ if [ $EXISTING_SECRET_NAME == 'null' ]; then read -p 'Enter your OAuth credentials Client ID: ' CLIENT_ID read -p 'Enter your OAuth credentials Client secret: ' CLIENT_SECRET + if [[ ($CONFIGURE_SPIN_CLI=="YES")||(-z "$CONFIGURE_SPIN_CLI") ]]; then cat >~/.spin/config < Date: Sun, 27 Dec 2020 14:37:55 +0100 Subject: [PATCH 2/2] Remove testing changes - fixes --- scripts/manage/add_missing_properties.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/manage/add_missing_properties.sh b/scripts/manage/add_missing_properties.sh index ecff500..3bb1f9d 100755 --- a/scripts/manage/add_missing_properties.sh +++ b/scripts/manage/add_missing_properties.sh @@ -4,9 +4,9 @@ bold() { echo ". $(tput bold)" "$*" "$(tput sgr0)"; } -#[ -z "$PARENT_DIR" ] && PARENT_DIR=$(dirname $(realpath $0) | rev | cut -d '/' -f 4- | rev) +[ -z "$PARENT_DIR" ] && PARENT_DIR=$(dirname $(realpath $0) | rev | cut -d '/' -f 4- | rev) -PROPERTIES_FILE=./../install/properties +PROPERTIES_FILE=$PARENT_DIR/spinnaker-for-gcp/scripts/install/properties add_property_if_missing() { if [ -z "$(grep "export $1=" $PROPERTIES_FILE)" ]; then