build/dev,ops

This commit is contained in:
Marc Beninca 2024-12-09 13:10:43 +01:00
parent 5190ef129e
commit 55a6a193f4
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 39 additions and 3 deletions

View file

@ -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"""\
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="index.css"> -->
<title>to.rwx.work</title>
</head><body>
{text}
</body></html>
""")

17
index.gv Normal file
View file

@ -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"]
}
}