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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-10-26 13:40:13 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-10-26 13:41:10 +0300
commiteea8a6d0620e47fb4c009eefb73fa100fa2ba3e8 (patch)
treeac5c809ef3f6322ca06f3618f52355bf00f9f361 /db/migrate
parent21854582ed26d8e351ce9ffe2d46261c5d606972 (diff)
Merge branch 'remove-satellites' into 'master'
Add migration to remove the contents of the satellites dir See merge request !1681
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20151023144219_remove_satellites.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20151023144219_remove_satellites.rb b/db/migrate/20151023144219_remove_satellites.rb
new file mode 100644
index 00000000000..e73f300028a
--- /dev/null
+++ b/db/migrate/20151023144219_remove_satellites.rb
@@ -0,0 +1,17 @@
+require 'fileutils'
+
+class RemoveSatellites < ActiveRecord::Migration
+ def up
+ satellites = Gitlab.config['satellites']
+ return if satellites.nil?
+
+ satellites_path = satellites['path']
+ return if satellites_path.nil?
+
+ FileUtils.rm_rf(satellites_path)
+ end
+
+ def down
+ # Do nothing
+ end
+end