darkwire.io/build.sh
Alan Friedman 8cd079ea8e
CORS fixes (#72)
* Add SITE_URL env var

* Debug git branch

* Set site URL to "false"

* Bug fix

* Fix CORS allowed methods

* Upgrade kcors

* Fix for API HOST in review apps

* Review app fixes

* Add bin/bash

* Refactor site URL code

* Cleanup API host
2019-05-19 16:42:30 -04:00

23 lines
385 B
Bash
Executable File

#!/bin/bash
api_host=$API_HOST
if [[ "$HEROKU_APP_NAME" =~ "-pr-" ]]
then
api_host=""
fi
echo "building client..."
cd client
yarn --production=false
REACT_APP_COMMIT_SHA=$SOURCE_VERSION \
REACT_APP_API_HOST=$api_host \
REACT_APP_API_PROTOCOL=$API_PROTOCOL \
REACT_APP_API_PORT=$API_PORT \
yarn build
cd ../
echo "building server..."
cd server
yarn --production=false
yarn build