This commit is contained in:
@ -26,7 +26,7 @@ steps: # 定义管道的执行步骤
|
|||||||
registry: https://git.liliyamol.cn:8081
|
registry: https://git.liliyamol.cn:8081
|
||||||
repo: git.liliyamol.cn:8081/mol/rss-server
|
repo: git.liliyamol.cn:8081/mol/rss-server
|
||||||
# auto_tag: true
|
# auto_tag: true
|
||||||
tags: ["1.2.0", latest]
|
tags: ["1.2.1", latest]
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline # 定义一个管道
|
kind: pipeline # 定义一个管道
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
def save_file(name, data):
|
def save_file(name, data):
|
||||||
temp_path = os.path.join(os.path.dirname(__file__), 'temp')
|
temp_path = os.path.join(os.path.dirname(__file__), 'temp')
|
||||||
@ -14,8 +15,15 @@ def remove_file(path):
|
|||||||
|
|
||||||
def clear_dir():
|
def clear_dir():
|
||||||
temp_path = os.path.join(os.path.dirname(__file__), 'temp')
|
temp_path = os.path.join(os.path.dirname(__file__), 'temp')
|
||||||
try:
|
flag = True
|
||||||
os.rmdir(temp_path)
|
for files in os.listdir(temp_path):
|
||||||
print('temp dir is cleared')
|
path = os.path.join(temp_path, files)
|
||||||
except:
|
|
||||||
print('temp clear failed')
|
try:
|
||||||
|
shutil.rmtree(path)
|
||||||
|
except OSError:
|
||||||
|
os.remove(path)
|
||||||
|
|
||||||
|
print('Info: temp dir is cleared')
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user