[refs #90] fix deleting old temporary git repos
This commit is contained in:
parent
1007e2c476
commit
3ddef19a29
|
@ -4,8 +4,8 @@ namespace :pull_requests do
|
||||||
task :clear => :environment do
|
task :clear => :environment do
|
||||||
Dir.chdir(File.join(APP_CONFIG['git_path'], 'temp_pull_requests')) do
|
Dir.chdir(File.join(APP_CONFIG['git_path'], 'temp_pull_requests')) do
|
||||||
say "Removing repos older one day:"
|
say "Removing repos older one day:"
|
||||||
say `find -mindepth 2 -maxdepth 2 -type d -mtime +0`
|
say `find -mindepth 3 -maxdepth 3 -type d -mtime +0`
|
||||||
`find -mindepth 2 -maxdepth 2 -type d -mtime +0 | xargs rm -rf`
|
`find -mindepth 3 -maxdepth 3 -type d -mtime +0 | xargs rm -rf`
|
||||||
say '-----'
|
say '-----'
|
||||||
say "Removing empty dir:"
|
say "Removing empty dir:"
|
||||||
say `find -maxdepth 2 -type d -empty`
|
say `find -maxdepth 2 -type d -empty`
|
||||||
|
|
Loading…
Reference in New Issue