build/dev,ops
This commit is contained in:
parent
5190ef129e
commit
55a6a193f4
2 changed files with 39 additions and 3 deletions
25
build.py
25
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"""\
|
||||
<!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
17
index.gv
Normal 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"]
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue