Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
more robust git, pm2 management (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-castillo committed Jan 18, 2019
1 parent c4fef07 commit 4b1a5f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -35,6 +35,8 @@ jspm_packages/

# dotenv environment variables file
.env
.env.development
.env.production

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
12 changes: 10 additions & 2 deletions deploy.sh
Expand Up @@ -4,7 +4,11 @@ if [[ "$CIRCLE_BRANCH" == "develop" ]]; then
git stash
git checkout -f develop
git pull origin develop
npm i -g pm2
git reset --hard origin/develop
if [ (npm list -g | grep pm2 | wc -l) -eq 0]; then
npm i -g pm2
pm2 update
fi
npm i
if [ ! -f .env.development ]; then
cp .env.development.example .env.development
Expand All @@ -15,7 +19,11 @@ if [ "$CIRCLE_BRANCH" == "master" ]; then
git stash
git checkout -f master
git pull origin master
npm i -g pm2
git reset --hard origin/master
if [ (npm list -g | grep pm2 | wc -l) -eq 0]; then
npm i -g pm2
pm2 update
fi
npm i
if [ ! -f .env.production ]; then
cp .env.production.example .env.production
Expand Down

0 comments on commit 4b1a5f7

Please sign in to comment.