1 Star 0 Fork 0

Sync.Nep / djc_helper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
_clear_github_artifact.py 665 Bytes
一键复制 编辑 原始数据 按行查看 历史
风之凌殇 提交于 2021-12-15 00:32 . ci: black format
import os
import shutil
from log import color
from util import show_head_line
def clear_github_artifact(dir_all_release, dir_github_action_artifact):
old_cwd = os.getcwd()
show_head_line("清空旧版本github artifact目录", color("bold_yellow"))
if not os.path.isdir(dir_all_release):
os.mkdir(dir_all_release)
os.chdir(dir_all_release)
shutil.rmtree(dir_github_action_artifact, ignore_errors=True)
os.mkdir(dir_github_action_artifact)
os.chdir(old_cwd)
if __name__ == "__main__":
dir_all_release = os.path.realpath(os.path.join("releases"))
clear_github_artifact(dir_all_release, "_github_action_artifact")
1
https://gitee.com/a915646637/djc_helper.git
git@gitee.com:a915646637/djc_helper.git
a915646637
djc_helper
djc_helper
master

搜索帮助