diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-24 09:31:23 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-24 09:31:23 +0100 |
commit | 4535129e45cc98ab5a1f17f0950a93bd062e3a5a (patch) | |
tree | a0263ada03b6af2ea6cc2c86891792e01a7e83fc /lib/tasks/gitlab/cleanup.rake | |
parent | 8c430f08866293fb1768db1cfdbeafa3a1ca3320 (diff) | |
parent | c5b29ed6f36779dbb96f4cdc7b1b0bce8bb8dc5e (diff) | |
download | gitlab-ce-4535129e45cc98ab5a1f17f0950a93bd062e3a5a.tar.gz |
Merge branch 'master' into zj-create-mattermost-team
Diffstat (limited to 'lib/tasks/gitlab/cleanup.rake')
-rw-r--r-- | lib/tasks/gitlab/cleanup.rake | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake index 967f630ef20..daf7382dd02 100644 --- a/lib/tasks/gitlab/cleanup.rake +++ b/lib/tasks/gitlab/cleanup.rake @@ -25,7 +25,6 @@ namespace :gitlab do end all_dirs.each do |dir_path| - if remove_flag if FileUtils.rm_rf dir_path puts "Removed...#{dir_path}".color(:red) @@ -53,11 +52,11 @@ namespace :gitlab do IO.popen(%W(find #{repo_root} -mindepth 1 -maxdepth 2 -name *.git)) do |find| find.each_line do |path| path.chomp! - repo_with_namespace = path. - sub(repo_root, ''). - sub(%r{^/*}, ''). - chomp('.git'). - chomp('.wiki') + repo_with_namespace = path + .sub(repo_root, '') + .sub(%r{^/*}, '') + .chomp('.git') + .chomp('.wiki') next if Project.find_by_full_path(repo_with_namespace) new_path = path + move_suffix puts path.inspect + ' -> ' + new_path.inspect |