From f669e4d1c7d8a7a64a454a747096d0f98b6d5eb4 Mon Sep 17 00:00:00 2001 From: Bardia Parmoun Date: Sat, 11 Nov 2023 14:21:43 -0500 Subject: [PATCH] Added a check for graphviz to the script. --- .github/workflows/diagrams.yml | 2 ++ generate_diagrams.sh | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/diagrams.yml b/.github/workflows/diagrams.yml index 2dea656..50d8251 100644 --- a/.github/workflows/diagrams.yml +++ b/.github/workflows/diagrams.yml @@ -2,8 +2,10 @@ name: Generate Diagrams on: push: + paths: [ '**.plantuml' ] branches: [ "main" ] pull_request: + paths: [ '**.plantuml' ] branches: [ "main" ] jobs: diff --git a/generate_diagrams.sh b/generate_diagrams.sh index c771796..69d914d 100755 --- a/generate_diagrams.sh +++ b/generate_diagrams.sh @@ -4,6 +4,13 @@ input_directory="./diagrams/plantUmlFiles" plantuml="./tools/plantuml.jar" +if [ $(which dot 2>/dev/null) ]; then + echo "Found GraphViz" +else + echo "Did not find GraphViz" + sudo apt install graphviz +fi + for file in "$input_directory"/*.plantuml; do if [ -f "$file" ]; then java -jar "$plantuml" "$file" -o "../"