Skip to content

Commit

Permalink
lug: add support of adhoc in mirrorz generation
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Nov 27, 2023
1 parent 052de77 commit 61683dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ dummy:
keep: 2
partial: 5

# adhoc settings for mirrorz.json generation
mirrorz_adhoc:
homebrew-bottles:
url: "/homebrew-bottles/bottles"

repos:
# centos
# - type: shell_script
Expand Down
4 changes: 4 additions & 0 deletions lug/worker-script/mirrorz.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ def main():
mirrorz["info"] = []
mirrors = []
sources = {item["name"]: item.get("source", "") for item in lug["repos"]}
adhoc = lug.get("mirrorz_adhoc", {})
for worker, param in summary["WorkerStatus"].items():
if worker.startswith(".") or worker == 'sjtug-internal' or worker == 'test':
continue
mirror = mirror_item(worker, param, help_items, sources)
if worker in adhoc:
for key, value in adhoc[worker].items():
mirror[key] = value
mirrors.append(mirror)

link_to(lug, summary, mirrors, help_items, sources)
Expand Down

0 comments on commit 61683dc

Please sign in to comment.