File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,6 @@ run-all: install-deps format-python check-python test-python check-commits build
8
8
install-deps :
9
9
poetry install
10
10
11
- # Generate SVG images from all PlantUML files
12
- generate-puml-all :
13
- docker run --rm -v $(pwd):/ puml -w / puml ghcr.io/ plantuml/ plantuml:latest -tsvg " **/*.puml"
14
-
15
- # Generate SVG image from specific PlantUML file
16
- generate-puml name :
17
- docker run --rm -v $(pwd):/ puml -w / puml ghcr.io/ plantuml/ plantuml:latest -tsvg " **/{{ name}} .puml"
18
-
19
11
# Run the Python tests
20
12
test-python :
21
13
poetry run pytest
@@ -39,7 +31,11 @@ build-website:
39
31
# Run checks on commits with non-main branches
40
32
check-commits :
41
33
#!/ bin/ zsh
42
- if [[ $(git rev-parse --abbrev-ref HEAD) != " main" ]]
34
+ branch_name=$(git rev-parse --abbrev-ref HEAD)
35
+ number_of_commits=$(git rev-list --count HEAD ^$branch_name)
36
+ if [[ ${branch_name} != " main" && ${number_of_commits} -gt 0 ]]
43
37
then
44
38
poetry run cz check --rev-range main..HEAD
39
+ else
40
+ echo " Not on main or haven't committed yet."
45
41
fi
You can’t perform that action at this time.
0 commit comments