ci/sub: Hardcode colors for bigheader/header in there

This commit is contained in:
Anmol Sethi 2022-12-01 15:08:19 -08:00
parent cc6590fa4f
commit 6e7b4dedfc
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA
4 changed files with 21 additions and 21 deletions

View file

@ -191,14 +191,14 @@ main() {
if [ -n "${UNINSTALL-}" ]; then if [ -n "${UNINSTALL-}" ]; then
uninstall uninstall
if [ -n "${DRY_RUN-}" ]; then if [ -n "${DRY_RUN-}" ]; then
FGCOLOR=3 bigheader "*********** bigheader "***********
Rerun without --dry-run to execute printed commands and perform install. Rerun without --dry-run to execute printed commands and perform install.
***********" ***********"
fi fi
else else
install install
if [ -n "${DRY_RUN-}" ]; then if [ -n "${DRY_RUN-}" ]; then
FGCOLOR=3 bigheader "*********** bigheader "***********
Rerun without --dry-run to execute printed commands and perform install. Rerun without --dry-run to execute printed commands and perform install.
***********" ***********"
fi fi
@ -292,7 +292,7 @@ EOF
install_d2_standalone() { install_d2_standalone() {
VERSION=${VERSION:-latest} VERSION=${VERSION:-latest}
FGCOLOR=4 header "installing d2-$VERSION" header "installing d2-$VERSION"
if [ "$VERSION" = latest ]; then if [ "$VERSION" = latest ]; then
fetch_release_info fetch_release_info
@ -329,7 +329,7 @@ install_d2_standalone() {
} }
install_d2_brew() { install_d2_brew() {
FGCOLOR=4 header "installing d2 with homebrew" header "installing d2 with homebrew"
sh_c brew tap terrastruct/d2 sh_c brew tap terrastruct/d2
sh_c brew install d2 sh_c brew install d2
} }
@ -338,7 +338,7 @@ install_tala_standalone() {
REPO="${REPO_TALA:-terrastruct/tala}" REPO="${REPO_TALA:-terrastruct/tala}"
VERSION=$TALA VERSION=$TALA
FGCOLOR=4 header "installing tala-$VERSION" header "installing tala-$VERSION"
if [ "$VERSION" = latest ]; then if [ "$VERSION" = latest ]; then
fetch_release_info fetch_release_info
@ -376,7 +376,7 @@ install_tala_standalone() {
} }
install_tala_brew() { install_tala_brew() {
FGCOLOR=4 header "installing tala with homebrew" header "installing tala with homebrew"
sh_c brew tap terrastruct/d2 sh_c brew tap terrastruct/d2
sh_c brew install tala sh_c brew install tala
} }
@ -386,7 +386,7 @@ uninstall() {
# uninstalling d2 as TALA depends on d2. # uninstalling d2 as TALA depends on d2.
if command -v d2plugin-tala >/dev/null; then if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)" INSTALLED_VERSION="$(d2plugin-tala --version)"
FGCOLOR=4 header "uninstalling tala-$INSTALLED_VERSION" header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in case $METHOD in
standalone) uninstall_tala_standalone ;; standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;; homebrew) uninstall_tala_brew ;;
@ -401,7 +401,7 @@ uninstall() {
fi fi
INSTALLED_VERSION="$(d2 --version)" INSTALLED_VERSION="$(d2 --version)"
FGCOLOR=4 header "uninstalling d2-$INSTALLED_VERSION" header "uninstalling d2-$INSTALLED_VERSION"
case $METHOD in case $METHOD in
standalone) uninstall_d2_standalone ;; standalone) uninstall_d2_standalone ;;
homebrew) uninstall_d2_brew ;; homebrew) uninstall_d2_brew ;;

View file

@ -221,12 +221,12 @@ EOF
} }
header() { header() {
logp "/* $1 */" FGCOLOR=${FGCOLOR:-4} logp "/* $1 */"
} }
bigheader() { bigheader() {
set -- "$(echo "$*" | sed "s/^/ * /")" set -- "$(echo "$*" | sed "s/^/ * /")"
logp "/** FGCOLOR=${FGCOLOR:-3} logp "/**
$* $*
**/" **/"
} }

2
ci/sub

@ -1 +1 @@
Subproject commit 70a9ad95ea0ae1de83fa3b7f7d4a160db4853c20 Subproject commit 4c77e964013db526bdbedf3b1d4b014881e2fde9

View file

@ -226,12 +226,12 @@ EOF
} }
header() { header() {
logp "/* $1 */" FGCOLOR=${FGCOLOR:-4} logp "/* $1 */"
} }
bigheader() { bigheader() {
set -- "$(echo "$*" | sed "s/^/ * /")" set -- "$(echo "$*" | sed "s/^/ * /")"
logp "/** FGCOLOR=${FGCOLOR:-3} logp "/**
$* $*
**/" **/"
} }
@ -676,14 +676,14 @@ main() {
if [ -n "${UNINSTALL-}" ]; then if [ -n "${UNINSTALL-}" ]; then
uninstall uninstall
if [ -n "${DRY_RUN-}" ]; then if [ -n "${DRY_RUN-}" ]; then
FGCOLOR=3 bigheader "*********** bigheader "***********
Rerun without --dry-run to execute printed commands and perform install. Rerun without --dry-run to execute printed commands and perform install.
***********" ***********"
fi fi
else else
install install
if [ -n "${DRY_RUN-}" ]; then if [ -n "${DRY_RUN-}" ]; then
FGCOLOR=3 bigheader "*********** bigheader "***********
Rerun without --dry-run to execute printed commands and perform install. Rerun without --dry-run to execute printed commands and perform install.
***********" ***********"
fi fi
@ -777,7 +777,7 @@ EOF
install_d2_standalone() { install_d2_standalone() {
VERSION=${VERSION:-latest} VERSION=${VERSION:-latest}
FGCOLOR=4 header "installing d2-$VERSION" header "installing d2-$VERSION"
if [ "$VERSION" = latest ]; then if [ "$VERSION" = latest ]; then
fetch_release_info fetch_release_info
@ -814,7 +814,7 @@ install_d2_standalone() {
} }
install_d2_brew() { install_d2_brew() {
FGCOLOR=4 header "installing d2 with homebrew" header "installing d2 with homebrew"
sh_c brew tap terrastruct/d2 sh_c brew tap terrastruct/d2
sh_c brew install d2 sh_c brew install d2
} }
@ -823,7 +823,7 @@ install_tala_standalone() {
REPO="${REPO_TALA:-terrastruct/tala}" REPO="${REPO_TALA:-terrastruct/tala}"
VERSION=$TALA VERSION=$TALA
FGCOLOR=4 header "installing tala-$VERSION" header "installing tala-$VERSION"
if [ "$VERSION" = latest ]; then if [ "$VERSION" = latest ]; then
fetch_release_info fetch_release_info
@ -861,7 +861,7 @@ install_tala_standalone() {
} }
install_tala_brew() { install_tala_brew() {
FGCOLOR=4 header "installing tala with homebrew" header "installing tala with homebrew"
sh_c brew tap terrastruct/d2 sh_c brew tap terrastruct/d2
sh_c brew install tala sh_c brew install tala
} }
@ -871,7 +871,7 @@ uninstall() {
# uninstalling d2 as TALA depends on d2. # uninstalling d2 as TALA depends on d2.
if command -v d2plugin-tala >/dev/null; then if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)" INSTALLED_VERSION="$(d2plugin-tala --version)"
FGCOLOR=4 header "uninstalling tala-$INSTALLED_VERSION" header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in case $METHOD in
standalone) uninstall_tala_standalone ;; standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;; homebrew) uninstall_tala_brew ;;
@ -886,7 +886,7 @@ uninstall() {
fi fi
INSTALLED_VERSION="$(d2 --version)" INSTALLED_VERSION="$(d2 --version)"
FGCOLOR=4 header "uninstalling d2-$INSTALLED_VERSION" header "uninstalling d2-$INSTALLED_VERSION"
case $METHOD in case $METHOD in
standalone) uninstall_d2_standalone ;; standalone) uninstall_d2_standalone ;;
homebrew) uninstall_d2_brew ;; homebrew) uninstall_d2_brew ;;