mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Fix removal of all docs
This commit is contained in:
parent
eb4451d80d
commit
9e45594130
1 changed files with 3 additions and 3 deletions
|
@ -144,9 +144,6 @@ def main():
|
||||||
run_git_fetch_and_restart_if_changed(remote_commits, target_branch)
|
run_git_fetch_and_restart_if_changed(remote_commits, target_branch)
|
||||||
branches = [ref[len("refs/remotes/%s/" % REMOTE):] for ref in run_git(
|
branches = [ref[len("refs/remotes/%s/" % REMOTE):] for ref in run_git(
|
||||||
"rev-parse", "--symbolic-full-name", "--remotes=%s" % REMOTE)]
|
"rev-parse", "--symbolic-full-name", "--remotes=%s" % REMOTE)]
|
||||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
|
||||||
for path in glob.iglob(os.path.join(TARGET_DIR, "*.html")):
|
|
||||||
run_git("rm", "--", path)
|
|
||||||
with TemporaryDirectory() as temp:
|
with TemporaryDirectory() as temp:
|
||||||
branch_docs = {}
|
branch_docs = {}
|
||||||
for branch in branches[:]:
|
for branch in branches[:]:
|
||||||
|
@ -157,6 +154,9 @@ def main():
|
||||||
else:
|
else:
|
||||||
branches.remove(branch)
|
branches.remove(branch)
|
||||||
checkout(target_branch)
|
checkout(target_branch)
|
||||||
|
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||||
|
for path in glob.iglob(os.path.join(TARGET_DIR, "*.html")):
|
||||||
|
run_git("rm", "--", path)
|
||||||
branches, default_branch = sort_branches(branches)
|
branches, default_branch = sort_branches(branches)
|
||||||
branches_pretty = [pretty_branch_name(b) for b in branches]
|
branches_pretty = [pretty_branch_name(b) for b in branches]
|
||||||
default_branch_pretty = pretty_branch_name(default_branch)
|
default_branch_pretty = pretty_branch_name(default_branch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue