Skip to content

Commit

Permalink
git setup ref #79; deploy self ENV fixes ref #78; contribution simpli…
Browse files Browse the repository at this point in the history
…fied for now
  • Loading branch information
seeReadCode committed Apr 5, 2017
1 parent 6275265 commit 8ccb3c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Fork, then clone the repo:
git clone git@github.com:your-username/coyote.git
```

Push to your fork, refer to our issues, and submit a [pull request](https://github.com/coyote-team/coyote/compare/develop...) to develop when you have changes rebased into a clean set of commits.
Push to your fork, refer to our issues, and submit a [pull request](https://github.com/coyote-team/coyote/compare) when you have changes rebased into a clean set of commits.

## Before you pull

Expand All @@ -32,4 +32,4 @@ git push


## Making changes
The `master` branch is used for our auto-deploy process and should be deploy-ready. Minor changes should target or be made on the `develop` branch. Substantial, feature-related changes should be made on a corresponding feature branch based off of `develop` branch. Commits should be rebased for conciseness and clarity before pull requests are made.
The `master` branch is used for our auto-deploy process and should be deploy-ready. Substantial, feature-related changes should be made on a corresponding feature branch. Commits should be rebased for conciseness and clarity before pull requests are made.
8 changes: 5 additions & 3 deletions bin/deploy_self.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[[ $1 == "development" ]] && exit

cd ~/code/coyote
unset RBENV_DIR RUBYLIB BUNDLER_ORIG_PATH GEM_HOME BUNDLE_PATH PATH BUNDLE_BIN_PATH RUBYOPT RBENV_HOOK_PATH BUNDLE_GEMFILE BUNDLER_VERSION RAILS_ENV
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games


DATE=$(date +"%Y%m%d%H%M")
DIR=~/backups/coyote_$DATE
Expand All @@ -13,10 +15,10 @@ rsync -az --copy-links ~/data/coyote/current/* $DIR
RAILS_ENV=$1 bundle exec rake backup:db
mv ../coyote*.sql $DIR

tar -zcvf $DIR.tar.gz ~/backups
tar -zcvf $DIR.tar.gz $DIR
rm -rf $DIR

#deploy
cd ~/code/coyote
source ~/.bash_profile
git pull
RAILS_ENV=development bundle install; bundle exec cap production deploy
5 changes: 5 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,14 @@ bundle exec cap production deploy
source /home/coyote/code/coyote/.env
source /home/coyote/code/coyote/.env.production
TASK="db:seed" bundle exec cap production rake

git config --global user.email $SUPPORT_EMAIL
git config --global user.name "{$WEBSITE_TITLE}"

exit

# nginx restart
service nginx restart

echo "Install, deploy and seed completed! Please open a browser and check your site"

0 comments on commit 8ccb3c9

Please sign in to comment.