Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for FIREBASE_TOKEN existence #48

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ if [ -z "${firebase_token}" ] ; then
fi
fi

if [ -n "${FIREBASE_TOKEN}" ] && [ -n "${service_credentials_file}" ]; then
echo_warn "Both authentication methods are defined: Firebase Token (via FIREBASE_TOKEN environment variable) and Service Credentials Field, one is enough."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, why do we have to use the uppercase one? I thought the lowercase one was already filled with the environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to. We even shouldn't use it. However, it is still recognized by CLI and a lot of people just call the secrets like that - FIREBASE_TOKEN.

fi

if [ -n "${firebase_token}" ] && [ -n "${service_credentials_file}" ]; then
echo_info "Both authentication inputs are defined: Firebase Token and Service Credentials Field, one is enough."
echo_warn "Both authentication inputs are defined: Firebase Token and Service Credentials Field, one is enough."
fi

if [ -z "${app}" ] ; then
Expand Down