summaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-12-07 19:15:06 +0100
committerJasper Maes <jaspermaes.jm@gmail.com>2018-12-14 19:36:22 +0100
commit44fef4fe4cb9d4f30f129ff5a548395bc924c8fe (patch)
treeac5e97a16658edfb25b8407f1cf2d9a11c172667 /bin/setup
parenteafc8e2f481751b973260287c844b70bd408dcb2 (diff)
downloadgitlab-ce-44fef4fe4cb9d4f30f129ff5a548395bc924c8fe.tar.gz
Remove rails 4 support in CI, Gemfiles, bin/ and config/
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup42
1 files changed, 7 insertions, 35 deletions
diff --git a/bin/setup b/bin/setup
index 34bb667087a..883825bc0a2 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,18 +1,12 @@
#!/usr/bin/env ruby
-def rails5?
- !%w[0 false].include?(ENV["RAILS5"])
-end
-
require "pathname"
# path to your application root.
APP_ROOT = Pathname.new File.expand_path("../../", __FILE__)
-if rails5?
- def system!(*args)
- system(*args) || abort("\n== Command #{args} failed ==")
- end
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
end
Dir.chdir APP_ROOT do
@@ -20,14 +14,8 @@ Dir.chdir APP_ROOT do
# Add necessary setup steps to this file:
puts "== Installing dependencies =="
-
- if rails5?
- system! "gem install bundler --conservative"
- system("bundle check") || system!("bundle install")
- else
- system "gem install bundler --conservative"
- system "bundle check || bundle install"
- end
+ system! "gem install bundler --conservative"
+ system("bundle check") || system!("bundle install")
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
@@ -35,27 +23,11 @@ Dir.chdir APP_ROOT do
# end
puts "\n== Preparing database =="
-
- if rails5?
- system! "bin/rails db:setup"
- else
- system "bin/rake db:reset"
- end
+ system! "bin/rails db:setup"
puts "\n== Removing old logs and tempfiles =="
-
- if rails5?
- system! "bin/rails log:clear tmp:clear"
- else
- system "rm -f log/*"
- system "rm -rf tmp/cache"
- end
+ system! "bin/rails log:clear tmp:clear"
puts "\n== Restarting application server =="
-
- if rails5?
- system! "bin/rails restart"
- else
- system "touch tmp/restart.txt"
- end
+ system! "bin/rails restart"
end