From 8c099c24993211920ee7048363ff3d13f90a2add Mon Sep 17 00:00:00 2001 From: Madhav Gharmalkar Date: Mon, 23 Oct 2023 11:15:35 -0700 Subject: [PATCH] update publish script to check for github token --- scripts/publish | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/publish b/scripts/publish index 937cb0a1..33ad22e5 100755 --- a/scripts/publish +++ b/scripts/publish @@ -76,6 +76,13 @@ verify_commit_is_signed() { fi } +check_github_token() { + if [[ -z "${GITHUB_TOKEN}" ]]; then + echo "GITHUB_TOKEN is not set." + exit 1 + fi +} + # Show help if no arguments passed if [ $# -eq 0 ]; then echo "Error! Missing release type argument" @@ -105,6 +112,8 @@ case $RELEASE_TYPE in ;; esac +check_github_token + # Make sure our working dir is the repo root directory cd "$(git rev-parse --show-toplevel)"