Skip to content

Commit

Permalink
fix release script github token validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Feb 1, 2023
1 parent eacba95 commit d755a7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ verify_github_token() {
release_env_file="$ROOT/.env.release"

if [[ "$GITHUB_TOKEN" != "" && ! -f "$release_env_file" ]]; then
echo 'GITHUB_TOKEN=${GITHUB_TOKEN}' > "$release_env_file"
echo "GITHUB_TOKEN=${GITHUB_TOKEN}" > "$release_env_file"
fi

if [ ! -f "$ROOT/.env.release" ] || ! grep -q "GITHUB_TOKEN=" "$release_env_file"; then
if [ ! -f "$ROOT/.env.release" ] || ! grep -q "GITHUB_TOKEN=gh" "$release_env_file"; then
echo "A '.env.release' file must be found at the root of the project and it must contain"
echo "definition of 'GITHUB_TOKEN' variable. You need to create this file locally and the"
echo "content should be:"
Expand Down Expand Up @@ -235,4 +235,4 @@ usage() {
echo " -h Display help about this script"
}

main "$@"
main "$@"

0 comments on commit d755a7e

Please sign in to comment.