From 55a6a193f4c77772292f3810606dfc2a69ff3beb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 9 Dec 2024 13:10:43 +0100 Subject: [PATCH] build/dev,ops --- build.py | 25 ++++++++++++++++++++++--- index.gv | 17 +++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 index.gv diff --git a/build.py b/build.py index 2dae185..2e1bc0d 100755 --- a/build.py +++ b/build.py @@ -3,9 +3,28 @@ from pathlib import Path -from rwx.fs import make_directory, write +from rwx.fs import make_directory, read_file_text, write +from rwx.ps import run if __name__ == "__main__": - out = Path(__file__).parent / "out" / "web" + root = Path(__file__).parent + out = root / "out" / "web" + gv = root / "index.gv" + svg = out / "index.svg" make_directory(out) - write(out / "index.html", "to.rwx.work") + run("dot", str(gv), "-Tsvg", "-o", str(svg)) + text = read_file_text(svg) + write(out / "index.html", f"""\ + + + + + +to.rwx.work + + + +{text} + + +""") diff --git a/index.gv b/index.gv new file mode 100644 index 0000000..c019cbf --- /dev/null +++ b/index.gv @@ -0,0 +1,17 @@ +digraph "index" { + +subgraph "cluster/dev" { label="Dev" + "plan" [label="Plan"] + "code" [label="Code"] + "build" [label="Build"] + "test" [label="Test"] +} + +subgraph "cluster/ops" { label="Ops" + "release" [label="Release"] + "deploy" [label="Deploy"] + "operate" [label="Operate"] + "monitor" [label="Monitor"] +} + +}