Explorar o código

Merge pull request #919 from meolu/2.0/feature/cleanup_remote

2.0/feature/cleanup remote
walle-web.io %!s(int64=6) %!d(string=hai) anos
pai
achega
aa84e24c10
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      walle/service/deployer.py

+ 1 - 1
walle/service/deployer.py

@@ -434,7 +434,7 @@ class Deployer:
         with waller.cd(self.project_info['target_releases']):
             result = waller.run(command, wenv=self.config())
 
-        command = 'ls -t {project_id}_* | tail -n +{keep_version_num} | xargs rm -rf'.format(
+        command = 'find ./ -name "{project_id}_*" -print | ls -t | tail -n +{keep_version_num} | xargs rm -rf'.format(
             project_id=self.project_info['id'], keep_version_num=int(self.project_info['keep_version_num']) + 1)
         with waller.cd(self.project_info['target_releases']):
             result = waller.run(command, wenv=self.config())