Last active
August 29, 2015 14:16
-
-
Save rishiag/22e9613d94f42a926314 to your computer and use it in GitHub Desktop.
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
cd code-repo | |
git pull origin master | |
rm ~/build-dir/code-repo.tar.gz | |
meteor build ~/build-dir/ | |
cd ~/build-dir | |
value=`cat fileCheck` | |
if [ "$value" = "old" ]; then | |
rm -rf ~/build-dir/new | |
mkdir ~/build-dir/new | |
tar xzvf code-repo.tar.gz -C ~/build-dir/new | |
cd ~/build-dir/new/bundle | |
(cd programs/server && npm install) | |
forever stop all | |
PORT=3000 MONGO_URL="some_url" ROOT_URL=some_url forever start main.js | |
echo "new" > fileCheck | |
else | |
rm -rf ~/build-dir/old | |
mkdir ~/build-dir/old | |
tar xzvf code-repo.tar.gz -C ~/build-dir/old | |
cd ~/build-dir/old/bundle | |
(cd programs/server && npm install) | |
forever stop all | |
PORT=3000 MONGO_URL="some_url" ROOT_URL=some_url forever start main.js | |
echo "old" > fileCheck | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment