summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-10-20 09:57:34 +0100
committerLars Wirzenius <liw@liw.fi>2012-10-20 09:57:34 +0100
commit4d1e53f92a9b80824b903e46a0744a01a3179872 (patch)
tree84ebe8ed896047c6b855f6eac510b5bfbf46e7f1
parentf2973ed11dae5d603f2d5012f7d2dbe0c9fe584f (diff)
downloadjenkinstool-4d1e53f92a9b80824b903e46a0744a01a3179872.tar.gz
Add utility to make a graphviz .dot file of build deps
-rwxr-xr-xdepgraph14
1 files changed, 14 insertions, 0 deletions
diff --git a/depgraph b/depgraph
new file mode 100755
index 0000000..c3d16a2
--- /dev/null
+++ b/depgraph
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import sys
+import json
+
+
+config = json.load(sys.stdin)
+
+print 'digraph foo {'
+for spec in config['projects']:
+ for dep in spec.get('build-depends', []):
+ print '"%s" -> "%s";' % (spec['name'], dep)
+print '}'
+