gitlabhq/install.rb

33 lines
711 B
Ruby
Raw Normal View History

2011-10-14 15:40:41 +02:00
root_path = File.expand_path(File.dirname(__FILE__))
require File.join(root_path, "lib", "color")
include Color
#
# ruby ./update.rb development # or test or production (default)
#
envs = ["production", "test", "development"]
env = if envs.include?(ARGV[0])
ARGV[0]
else
"production"
end
puts green " == Install for ENV=#{env} ..."
# bundle install
`bundle install`
2011-10-14 16:13:24 +02:00
2011-10-14 15:40:41 +02:00
# migrate db
2011-10-14 16:13:24 +02:00
`bundle exec rake db:create RAILS_ENV=#{env}`
`bundle exec rake db:schema:load RAILS_ENV=#{env}`
2011-10-14 15:40:41 +02:00
`bundle exec rake db:seed_fu RAILS_ENV=#{env}`
2011-10-14 15:56:21 +02:00
puts green %q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
2011-10-14 15:40:41 +02:00
puts green " == Done! Now you can start server"