From 000006006dd9677374dd136c9a34ef3c4e2768c1 Mon Sep 17 00:00:00 2001 From: Gustav Westling Date: Thu, 5 Oct 2023 14:19:09 +0200 Subject: [PATCH] hack/release: add dependencies check --- hack/release | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hack/release b/hack/release index 0da8cf7..5d213d6 100755 --- a/hack/release +++ b/hack/release @@ -6,6 +6,22 @@ function echoinfo() { printf "${LIGHT_GREEN}%s${NC}\n" "$1" } +function echoerr() { + RED='\033[0;31m' + NC='\033[0m' # No Color + printf "${RED}%s${NC}\n" "$1" >&2 +} + + +######################################################################################################################## +# Dependencies check # +######################################################################################################################## +if ! command -v sha256sum &>/dev/null; then + echoerr "[!] Dependency sha256sum was not found on your PATH. (brew install coreutils)" + exit 1 +fi + + git_sha1=$(git rev-parse HEAD) # shellcheck disable=SC2001