deploy.sh

echo "Starting deployment"
pwd
echo ""
cd client
pwd
echo "npm run build"
npm run build

cd ../server
pwd
echo "clear public directory"
rm -rf public
echo "mv ../client/build public"
mv ../client/build public
ls -l public

echo ""
echo "replacing localhost references"
grep -rli 'localhost:8585' * | xargs -i@ sed -i 's/http:\/\/localhost:8585/https:\/\/bubbles-india.herokuapp.com/g' @

echo ""
echo "Enter git message:"
read message
git add .
git commit -m "$message"
git push heroku master