-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require env vars in start/build scripts
This makes sure that you can't start or build the front-end without having the required env vars set. If they aren't set, things will break in hard-to-understand ways.
- Loading branch information
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ -z "$PAIRIST_FIREBASE_PROJECT_ID" ]; then | ||
echo "PAIRIST_FIREBASE_PROJECT_ID is not set." | ||
echo "This should be set to your Firebase project ID." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$PAIRIST_FIREBASE_API_KEY" ]; then | ||
echo "PAIRIST_FIREBASE_API_KEY is not set." | ||
echo "This should be set to your Firebase API key." | ||
exit 1 | ||
fi | ||
|
||
set -x | ||
|
||
# Build project | ||
REACT_APP_FIREBASE_PROJECT_ID=${PAIRIST_FIREBASE_PROJECT_ID} \ | ||
REACT_APP_FIREBASE_API_KEY=${PAIRIST_FIREBASE_API_KEY} \ | ||
REACT_APP_FIREBASE_AUTH_DOMAIN="${PAIRIST_FIREBASE_PROJECT_ID}.firebaseapp.com" \ | ||
REACT_APP_FIREBASE_URL="https://${PAIRIST_FIREBASE_PROJECT_ID}.firebaseio.com" \ | ||
yarn run craco build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ -z "$PAIRIST_FIREBASE_PROJECT_ID" ]; then | ||
echo "PAIRIST_FIREBASE_PROJECT_ID is not set." | ||
echo "This should be set to your Firebase project ID." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$PAIRIST_FIREBASE_API_KEY" ]; then | ||
echo "PAIRIST_FIREBASE_API_KEY is not set." | ||
echo "This should be set to your Firebase API key." | ||
exit 1 | ||
fi | ||
|
||
set -x | ||
|
||
# Start dev server | ||
REACT_APP_FIREBASE_PROJECT_ID=${PAIRIST_FIREBASE_PROJECT_ID} \ | ||
REACT_APP_FIREBASE_API_KEY=${PAIRIST_FIREBASE_API_KEY} \ | ||
REACT_APP_FIREBASE_AUTH_DOMAIN="${PAIRIST_FIREBASE_PROJECT_ID}.firebaseapp.com" \ | ||
REACT_APP_FIREBASE_URL="https://${PAIRIST_FIREBASE_PROJECT_ID}.firebaseio.com" \ | ||
yarn run craco start |