diff --git a/.github/workflows/diagrams.yml b/.github/workflows/diagrams.yml new file mode 100644 index 0000000..2dea656 --- /dev/null +++ b/.github/workflows/diagrams.yml @@ -0,0 +1,18 @@ +name: Generate Diagrams + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + run_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run ./generate_diagrams.sh + run: | + chmod +x ./generate_diagrams.sh + ./generate_diagrams.sh + shell: bash \ No newline at end of file diff --git a/diagrams/Milestone1_ER_Diagram.png b/diagrams/Milestone1_ER_Diagram.png index bac2acb..8066811 100644 Binary files a/diagrams/Milestone1_ER_Diagram.png and b/diagrams/Milestone1_ER_Diagram.png differ diff --git a/diagrams/Milestone1_UML_Class_Diagram.png b/diagrams/Milestone1_UML_Class_Diagram.png new file mode 100644 index 0000000..1564e41 Binary files /dev/null and b/diagrams/Milestone1_UML_Class_Diagram.png differ diff --git a/diagrams/Milestone1_UML_class_diagram.png b/diagrams/Milestone1_UML_class_diagram.png deleted file mode 100644 index 3d9e578..0000000 Binary files a/diagrams/Milestone1_UML_class_diagram.png and /dev/null differ diff --git a/plantUmlFiles/ERDiagram.plantuml b/diagrams/plantUmlFiles/ERDiagram.plantuml similarity index 82% rename from plantUmlFiles/ERDiagram.plantuml rename to diagrams/plantUmlFiles/ERDiagram.plantuml index a10e566..ab2e1e9 100644 --- a/plantUmlFiles/ERDiagram.plantuml +++ b/diagrams/plantUmlFiles/ERDiagram.plantuml @@ -1,4 +1,9 @@ -@startuml +@startuml Milestone1_ER_Diagram +skinparam classFontSize 11 +skinparam classBackgroundColor beige +skinparam ClassBorderColor red +skinparam ArrowColor red + entity "Answer" as answer { *id : Long *content : String diff --git a/plantUmlFiles/UMLClassDiagram.plantuml b/diagrams/plantUmlFiles/UMLClassDiagram.plantuml similarity index 98% rename from plantUmlFiles/UMLClassDiagram.plantuml rename to diagrams/plantUmlFiles/UMLClassDiagram.plantuml index 1071547..13c7dde 100644 --- a/plantUmlFiles/UMLClassDiagram.plantuml +++ b/diagrams/plantUmlFiles/UMLClassDiagram.plantuml @@ -1,4 +1,4 @@ -@startuml Milestone1_UML_class_diagram +@startuml Milestone1_UML_Class_Diagram skinparam classFontSize 11 skinparam classBackgroundColor beige skinparam ClassBorderColor red diff --git a/generate_diagrams.sh b/generate_diagrams.sh new file mode 100755 index 0000000..c771796 --- /dev/null +++ b/generate_diagrams.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +input_directory="./diagrams/plantUmlFiles" + +plantuml="./tools/plantuml.jar" + +for file in "$input_directory"/*.plantuml; do + if [ -f "$file" ]; then + java -jar "$plantuml" "$file" -o "../" + fi +done diff --git a/tools/plantuml.jar b/tools/plantuml.jar new file mode 100644 index 0000000..00b1c10 Binary files /dev/null and b/tools/plantuml.jar differ