diff --git a/CHANGELOG.md b/CHANGELOG.md index 805d8122..7a563834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release - Replace raw echo with standard output helpers in git/switchtomain - Replace raw echo with output helpers in git/optimise-git - Replace raw echo with output helpers in git/mkmissing-release +- Replace raw echo with output helpers in git/init-preview ### Changed - Replace raw echo with standard output helpers (die/info/success) in github/cancel-workflows - Replace raw echo with standard output helpers (die/info/success) in git/update-repos-personal diff --git a/git/init-preview b/git/init-preview index 303d0c08..cffb5d60 100755 --- a/git/init-preview +++ b/git/init-preview @@ -1,11 +1,18 @@ #! /bin/sh die() { - echo - echo "$@" + printf '\n\033[31m✗\033[0m %s\n' "$*" >&2 exit 1 } +success() { + printf '\n\033[32m✓\033[0m %s\n' "$*" +} + +info() { + printf '\n\033[32m→\033[0m %s\n' "$*" +} + BASEDIR="$(dirname "$(readlink -f "$0")")" # shellcheck source=/dev/null @@ -15,6 +22,6 @@ BASEDIR="$(dirname "$(readlink -f "$0")")" BRANCH="depends/sdk/dotnet/$DOTNET_PREVIEW_VERSION/preview" -echo "Using Branch: $BRANCH" +info "Using Branch: $BRANCH" -git fetch && git checkout main && git pull && git checkout -b "$BRANCH" && update-dotnet-sdk +git fetch && git checkout main && git pull && git checkout -b "$BRANCH" && update-dotnet-sdk && success "Branch $BRANCH initialised"