54f7b740dc
* Allow to follow/unfollow markets, backfill as well * remove yarn script edit * add decrement comment * Lint * Decrement follow count on unfollow * Follow/unfollow button logic * Unfollow/follow => heart * Add user to followers in place-bet and sell-shares * Add tracking * Show contract follow modal for first time following * Increment follower count as well * Remove add follow from bet trigger * restore on-create-bet * Add pubsub to dev.sh, show heart on FR, remove from answer trigger
44 lines
1.2 KiB
Bash
Executable File
44 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
ENV=${1:-dev}
|
|
case $ENV in
|
|
dev)
|
|
FIREBASE_PROJECT=dev
|
|
NEXT_ENV=DEV ;;
|
|
prod)
|
|
FIREBASE_PROJECT=prod
|
|
NEXT_ENV=PROD ;;
|
|
localdb)
|
|
FIREBASE_PROJECT=dev
|
|
NEXT_ENV=DEV
|
|
EMULATOR=true ;;
|
|
*)
|
|
echo "Invalid environment; must be dev, prod, or localdb."
|
|
exit 1
|
|
esac
|
|
|
|
firebase use $FIREBASE_PROJECT
|
|
|
|
if [ ! -z $EMULATOR ]
|
|
then
|
|
npx concurrently \
|
|
-n FIRESTORE,FUNCTIONS,NEXT,TS \
|
|
-c green,white,magenta,cyan \
|
|
"yarn --cwd=functions localDbScript" \
|
|
"cross-env FIRESTORE_EMULATOR_HOST=localhost:8080 yarn --cwd=functions dev" \
|
|
"cross-env NEXT_PUBLIC_FUNCTIONS_URL=http://localhost:8088 \
|
|
NEXT_PUBLIC_FIREBASE_EMULATE=TRUE \
|
|
NEXT_PUBLIC_FIREBASE_ENV=${NEXT_ENV} \
|
|
yarn --cwd=web serve" \
|
|
"cross-env yarn --cwd=web ts-watch"
|
|
else
|
|
npx concurrently \
|
|
-n FUNCTIONS,NEXT,TS \
|
|
-c white,magenta,cyan \
|
|
"yarn --cwd=functions dev" \
|
|
"cross-env NEXT_PUBLIC_FUNCTIONS_URL=http://localhost:8088 \
|
|
NEXT_PUBLIC_FIREBASE_ENV=${NEXT_ENV} \
|
|
yarn --cwd=web serve" \
|
|
"cross-env yarn --cwd=web ts-watch"
|
|
fi
|