summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-02-17 20:41:26 -0500
committerBen Sima <ben@bsima.me>2021-02-17 20:41:26 -0500
commitde2812264d221c05acc1870f007514ff1edcdb80 (patch)
treea7ff6944de7f0bf497e072785e99e2e0aa8259bc
parentee469d0b52c041583e64904b7bda54485ebdeef7 (diff)
Colors and structured logging for push
-rw-r--r--Biz/Bild/ShellHook.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh
index 85694ec..19720aa 100644
--- a/Biz/Bild/ShellHook.sh
+++ b/Biz/Bild/ShellHook.sh
@@ -13,6 +13,12 @@ function help() {
echo " ship lint, bild, and push one (or all) namespace(s)"
}
+# color codes for use with printf
+RED='\033[0;31m'
+GRN='\033[0;32m'
+YEL='\033[0;33m'
+NC='\033[0m' # No Color
+
alias runghc="runghc --ghc-arg=-i$BIZ_ROOT"
alias tree="tree -I _"
@@ -52,7 +58,6 @@ function push() {
else
target="$prefix.$1"
fi
- echo "push: $target"
what=$(realpath "$BIZ_ROOT/_/bild/nix/$target")
# hack: get the domain from the activation script. there does not seem
# to be a way to get it from nix-instantiate
@@ -60,6 +65,7 @@ function push() {
nix copy --to ssh://root@$where $what
ssh root@$where $what/bin/switch-to-configuration switch
ssh root@$where nix-env --profile /nix/var/nix/profiles/system --set $what
+ printf "${GRN}good: push: $target${NC}"
}
# TODO: convert to haskell
@@ -91,10 +97,6 @@ function run-sentry() {
https://bsima.me
https://herocomics.app
)
- RED='\033[0;31m'
- GRN='\033[0;32m'
- YEL='\033[0;33m'
- NC='\033[0m' # No Color
for url in ${urls[@]}
do
code=$(curl -L --max-time 10 --silent --show-error --insecure \