Skip to content

Commit

Permalink
update publish script to check for github token (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhav-stripe authored Oct 24, 2023
1 parent ec71713 commit d899b71
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,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"
Expand Down Expand Up @@ -138,6 +145,8 @@ if [ -n "$PREID" ]; then
fi
fi

check_github_token

# Make sure our working dir is the repo root directory
cd "$(git rev-parse --show-toplevel)"

Expand Down

0 comments on commit d899b71

Please sign in to comment.