Created
April 24, 2019 02:24
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'graph' | |
require 'psych' | |
steps = Psych.load(File.read(ARGV[0]))["steps"] | |
previous_steps = [] | |
digraph do | |
steps.each do |step| | |
id = step["id"] || step["name"] | |
deps = step["waitFor"] || previous_steps | |
deps.each do |dep| | |
break if dep == "-" | |
edge dep, id | |
end | |
previous_steps << id | |
end | |
save "buildgraph", "png" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment