diff --git a/build b/build index b125ba3..4157ed8 100755 --- a/build +++ b/build @@ -97,6 +97,7 @@ if [ "$resolve_cname" = 1 ]; then fi make_opts=( + CI="$CI" REPO="$repo" COMMIT="$commit" TIMESTAMP="$timestamp" diff --git a/builder/make_log b/builder/make_log index d262842..6de7f88 100755 --- a/builder/make_log +++ b/builder/make_log @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -eufo pipefail +set -efo pipefail target="$1" shift @@ -9,6 +9,12 @@ echo -n | cat "${@/%/.log}" > "$target.log" while IFS= read -r line; do date="$(date -u '+%Y-%m-%d %H:%M:%S')" - printf '[%s %s] %s\n' "$target" "$date" "$line" + + if [ "${CI}" == "true" ]; then + printf '[%s] %s\n' "$target" "$line" + else + printf '[%s %s] %s\n' "$target" "$date" "$line" + fi + printf '[%s] %s\n' "$date" "$line" >> "$target.log" done