[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
|
||||
Dir.chdir(File.join(APP_CONFIG['git_path'], 'temp_pull_requests')) do
|
||||
say "Removing repos older one day:"
|
||||
say `find -mindepth 2 -maxdepth 2 -type d -mtime +0`
|
||||
`find -mindepth 2 -maxdepth 2 -type d -mtime +0 | xargs rm -rf`
|
||||
say `find -mindepth 3 -maxdepth 3 -type d -mtime +0`
|
||||
`find -mindepth 3 -maxdepth 3 -type d -mtime +0 | xargs rm -rf`
|
||||
say '-----'
|
||||
say "Removing empty dir:"
|
||||
say `find -maxdepth 2 -type d -empty`
|
||||
|
|
Loading…
Reference in New Issue