Browse Source

fix bug: 历史版本未删除

Alenx 6 years ago
parent
commit
003a4986ff
1 changed files with 1 additions and 1 deletions
  1. 1 1
      walle/service/deployer.py

+ 1 - 1
walle/service/deployer.py

@@ -429,7 +429,7 @@ class Deployer:
         with waller.cd(self.project_info['target_releases']):
             result = waller.run(command, wenv=self.config())
 
-        command = 'ls -t {project_id}_* | head -{keep_version_num} | xargs rm -rf'.format(
+        command = 'ls -t {project_id}_* | 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())