Skip to content

Commit

Permalink
Created a script to auto generate the uml diagrams and added a workfl…
Browse files Browse the repository at this point in the history
…ow for it.
  • Loading branch information
bardia-p committed Nov 11, 2023
1 parent a3602b3 commit 4528ba2
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/diagrams.yml
Original file line number Diff line number Diff line change
@@ -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
Binary file modified diagrams/Milestone1_ER_Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diagrams/Milestone1_UML_Class_Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed diagrams/Milestone1_UML_class_diagram.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@startuml Milestone1_UML_class_diagram
@startuml Milestone1_UML_Class_Diagram
skinparam classFontSize 11
skinparam classBackgroundColor beige
skinparam ClassBorderColor red
Expand Down
11 changes: 11 additions & 0 deletions generate_diagrams.sh
Original file line number Diff line number Diff line change
@@ -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
Binary file added tools/plantuml.jar
Binary file not shown.

0 comments on commit 4528ba2

Please sign in to comment.