Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update.rb - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d7eec2898b2023a512b3a69f259ee1450ba5d019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 " == Update for ENV=#{env}"

# pull from github
`git pull`

`bundle install`

# migrate db
`bundle exec rake db:migrate RAILS_ENV=#{env}`


puts green " == Done! Now you can start/restart server"