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

Commit

Permalink
Improve steps. Add sample files commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
etagwerker committed Jun 7, 2017
1 parent 0efc76c commit 71f177c
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ Dir.chdir APP_ROOT do
system "gem install bundler --conservative"
system "bundle check || bundle install"

# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end
puts "\n== Copying sample files =="
unless File.exist?("config/database.yml")
system "cp config/database.yml.sample config/database.yml"
end

unless File.exist?(".ruby-version")
system "cp .ruby-version.sample .ruby-version"
end

unless File.exist?(".env")
system "cp .env.sample .env"
end

puts "\n== Preparing database =="
system "bin/rake db:setup"

puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"

puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
end

0 comments on commit 71f177c

Please sign in to comment.