Skip to content

Commit

Permalink
Allow custom setup
Browse files Browse the repository at this point in the history
- Include "custom" logic in bin/setup.
- Add custom folder to gitignore.
  • Loading branch information
Jesse Goerz committed Dec 19, 2017
1 parent 44b527f commit 5c9ceda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# Ignore config
/config/database.yml

# Ignore custom setup files (see bin/setup)
/custom

/node_modules

/public/assets
Expand Down
6 changes: 3 additions & 3 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ try "Bundling" "bundle check > /dev/null || bundle --local --quiet "

echo
bold "Copying example files"
try "Creating .env" "test -e .env || cp .env.bootstrap .env"
try "Creating config/database.yml" "test -e config/database.yml || cp config/database.mysql.yml.example config/database.yml"
try "Creating databases" "bundle exec rake db:setup > /dev/null"
try "Creating .env" "test -e .env || (test -e custom/.env.bootstrap && cp custom/.env.bootstrap .env) || cp .env.bootstrap .env"
try "Creating config/database.yml" "test -e config/database.yml || (test -e custom/database.yml && cp custom/database.yml config/database.yml) || cp config/database.mysql.yml.example config/database.yml"
try "Creating databases" "(test -e custom/seeds.rb && cp -f custom/seeds.rb db/seeds.rb) && false || bundle exec rake db:setup > /dev/null"

echo
bold "Success!"

0 comments on commit 5c9ceda

Please sign in to comment.