Makefile targets for generating UML
This commit is contained in:
parent
555a3fa7ec
commit
a291972f82
2 changed files with 21 additions and 1 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -7,8 +7,12 @@
|
||||||
|
|
||||||
bin
|
bin
|
||||||
database.txt
|
database.txt
|
||||||
|
plantuml.jar
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
*.png
|
diagram.puml
|
||||||
|
backend/*.png
|
||||||
|
backend/*.jpg
|
||||||
|
backend/*.svg
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|
|
@ -27,6 +27,10 @@ clean:
|
||||||
$(GOCLEAN)
|
$(GOCLEAN)
|
||||||
rm -rf bin
|
rm -rf bin
|
||||||
rm -f db.sqlite3
|
rm -f db.sqlite3
|
||||||
|
rm -f diagram*
|
||||||
|
rm -f plantuml.jar
|
||||||
|
rm -f erd.png
|
||||||
|
rm -f config.toml
|
||||||
|
|
||||||
# Test target
|
# Test target
|
||||||
test: db.sqlite3
|
test: db.sqlite3
|
||||||
|
@ -98,6 +102,18 @@ install-lint:
|
||||||
@echo "Installing golangci-lint"
|
@echo "Installing golangci-lint"
|
||||||
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.42.1
|
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.42.1
|
||||||
|
|
||||||
|
# Fetches the latest plantuml.jar and checks its SHA256 hash
|
||||||
|
plantuml.jar:
|
||||||
|
curl -sSfL https://github.com/plantuml/plantuml/releases/download/v1.2024.3/plantuml.jar -o plantuml.jar \
|
||||||
|
&& echo "519a4a7284c6a0357c369e4bb0caf72c4bfbbde851b8c6d6bbdb7af3c01fc82f plantuml.jar" | sha256sum -c
|
||||||
|
|
||||||
|
# Generate UML diagrams diagral.png & diagram.svg
|
||||||
|
.PHONY: uml
|
||||||
|
uml: plantuml.jar
|
||||||
|
goplantuml -recursive . > diagram.puml
|
||||||
|
java -jar plantuml.jar -tpng diagram.puml
|
||||||
|
java -jar plantuml.jar -tsvg diagram.puml
|
||||||
|
|
||||||
# Convenience target to install just (requires sudo privileges)
|
# Convenience target to install just (requires sudo privileges)
|
||||||
install-just:
|
install-just:
|
||||||
@echo "Installing just"
|
@echo "Installing just"
|
||||||
|
|
Loading…
Reference in a new issue