From 6e7b4dedfc59e455be028ea103f31bc5ba0a05ba Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Thu, 1 Dec 2022 15:08:19 -0800 Subject: [PATCH] ci/sub: Hardcode colors for bigheader/header in there --- ci/release/_install.sh | 16 ++++++++-------- ci/release/template/scripts/lib.sh | 4 ++-- ci/sub | 2 +- install.sh | 20 ++++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ci/release/_install.sh b/ci/release/_install.sh index 53ac7aa78..50b4e5e3b 100755 --- a/ci/release/_install.sh +++ b/ci/release/_install.sh @@ -191,14 +191,14 @@ main() { if [ -n "${UNINSTALL-}" ]; then uninstall if [ -n "${DRY_RUN-}" ]; then - FGCOLOR=3 bigheader "*********** + bigheader "*********** Rerun without --dry-run to execute printed commands and perform install. ***********" fi else install if [ -n "${DRY_RUN-}" ]; then - FGCOLOR=3 bigheader "*********** + bigheader "*********** Rerun without --dry-run to execute printed commands and perform install. ***********" fi @@ -292,7 +292,7 @@ EOF install_d2_standalone() { VERSION=${VERSION:-latest} - FGCOLOR=4 header "installing d2-$VERSION" + header "installing d2-$VERSION" if [ "$VERSION" = latest ]; then fetch_release_info @@ -329,7 +329,7 @@ install_d2_standalone() { } install_d2_brew() { - FGCOLOR=4 header "installing d2 with homebrew" + header "installing d2 with homebrew" sh_c brew tap terrastruct/d2 sh_c brew install d2 } @@ -338,7 +338,7 @@ install_tala_standalone() { REPO="${REPO_TALA:-terrastruct/tala}" VERSION=$TALA - FGCOLOR=4 header "installing tala-$VERSION" + header "installing tala-$VERSION" if [ "$VERSION" = latest ]; then fetch_release_info @@ -376,7 +376,7 @@ install_tala_standalone() { } install_tala_brew() { - FGCOLOR=4 header "installing tala with homebrew" + header "installing tala with homebrew" sh_c brew tap terrastruct/d2 sh_c brew install tala } @@ -386,7 +386,7 @@ uninstall() { # uninstalling d2 as TALA depends on d2. if command -v d2plugin-tala >/dev/null; then INSTALLED_VERSION="$(d2plugin-tala --version)" - FGCOLOR=4 header "uninstalling tala-$INSTALLED_VERSION" + header "uninstalling tala-$INSTALLED_VERSION" case $METHOD in standalone) uninstall_tala_standalone ;; homebrew) uninstall_tala_brew ;; @@ -401,7 +401,7 @@ uninstall() { fi INSTALLED_VERSION="$(d2 --version)" - FGCOLOR=4 header "uninstalling d2-$INSTALLED_VERSION" + header "uninstalling d2-$INSTALLED_VERSION" case $METHOD in standalone) uninstall_d2_standalone ;; homebrew) uninstall_d2_brew ;; diff --git a/ci/release/template/scripts/lib.sh b/ci/release/template/scripts/lib.sh index cf17657e7..d945da3f3 100644 --- a/ci/release/template/scripts/lib.sh +++ b/ci/release/template/scripts/lib.sh @@ -221,12 +221,12 @@ EOF } header() { - logp "/* $1 */" + FGCOLOR=${FGCOLOR:-4} logp "/* $1 */" } bigheader() { set -- "$(echo "$*" | sed "s/^/ * /")" - logp "/** + FGCOLOR=${FGCOLOR:-3} logp "/** $* **/" } diff --git a/ci/sub b/ci/sub index 70a9ad95e..4c77e9640 160000 --- a/ci/sub +++ b/ci/sub @@ -1 +1 @@ -Subproject commit 70a9ad95ea0ae1de83fa3b7f7d4a160db4853c20 +Subproject commit 4c77e964013db526bdbedf3b1d4b014881e2fde9 diff --git a/install.sh b/install.sh index 80110903f..616222862 100755 --- a/install.sh +++ b/install.sh @@ -226,12 +226,12 @@ EOF } header() { - logp "/* $1 */" + FGCOLOR=${FGCOLOR:-4} logp "/* $1 */" } bigheader() { set -- "$(echo "$*" | sed "s/^/ * /")" - logp "/** + FGCOLOR=${FGCOLOR:-3} logp "/** $* **/" } @@ -676,14 +676,14 @@ main() { if [ -n "${UNINSTALL-}" ]; then uninstall if [ -n "${DRY_RUN-}" ]; then - FGCOLOR=3 bigheader "*********** + bigheader "*********** Rerun without --dry-run to execute printed commands and perform install. ***********" fi else install if [ -n "${DRY_RUN-}" ]; then - FGCOLOR=3 bigheader "*********** + bigheader "*********** Rerun without --dry-run to execute printed commands and perform install. ***********" fi @@ -777,7 +777,7 @@ EOF install_d2_standalone() { VERSION=${VERSION:-latest} - FGCOLOR=4 header "installing d2-$VERSION" + header "installing d2-$VERSION" if [ "$VERSION" = latest ]; then fetch_release_info @@ -814,7 +814,7 @@ install_d2_standalone() { } install_d2_brew() { - FGCOLOR=4 header "installing d2 with homebrew" + header "installing d2 with homebrew" sh_c brew tap terrastruct/d2 sh_c brew install d2 } @@ -823,7 +823,7 @@ install_tala_standalone() { REPO="${REPO_TALA:-terrastruct/tala}" VERSION=$TALA - FGCOLOR=4 header "installing tala-$VERSION" + header "installing tala-$VERSION" if [ "$VERSION" = latest ]; then fetch_release_info @@ -861,7 +861,7 @@ install_tala_standalone() { } install_tala_brew() { - FGCOLOR=4 header "installing tala with homebrew" + header "installing tala with homebrew" sh_c brew tap terrastruct/d2 sh_c brew install tala } @@ -871,7 +871,7 @@ uninstall() { # uninstalling d2 as TALA depends on d2. if command -v d2plugin-tala >/dev/null; then INSTALLED_VERSION="$(d2plugin-tala --version)" - FGCOLOR=4 header "uninstalling tala-$INSTALLED_VERSION" + header "uninstalling tala-$INSTALLED_VERSION" case $METHOD in standalone) uninstall_tala_standalone ;; homebrew) uninstall_tala_brew ;; @@ -886,7 +886,7 @@ uninstall() { fi INSTALLED_VERSION="$(d2 --version)" - FGCOLOR=4 header "uninstalling d2-$INSTALLED_VERSION" + header "uninstalling d2-$INSTALLED_VERSION" case $METHOD in standalone) uninstall_d2_standalone ;; homebrew) uninstall_d2_brew ;;