Skip to content

Commit

Permalink
Only add the pusher suffix when using the dev api
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Dec 2, 2022
1 parent aed921f commit 8771b4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/set-pusher-suffix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
# config file to be parsed for the suffix (relative to current project root)
CONFIG_FILE="../Web-Expensify/_config.local.php"

# Export vars from the .env file
export $(grep -v '^#' .env | xargs)

# use the suffix only when the config file can be found
if [ -f "$CONFIG_FILE" ]; then
# If we are pointing to the staging or production api don't add the suffix
if [[ $EXPENSIFY_URL == "https://www.expensify.com/" ]]; then
echo "Ignoring the PUSHER_DEV_SUFFIX since we are not pointing to the dev API"
exit 0
fi

echo "Using PUSHER_DEV_SUFFIX from $CONFIG_FILE"

PATTERN="PUSHER_DEV_SUFFIX.*'(.+)'"
Expand Down

0 comments on commit 8771b4d

Please sign in to comment.