- Install Java
- Graphviz (Optional)
- Go to your project directory and download a copy of plantuml.jar (https://sourceforge.net/projects/plantuml/files/plantuml.jar/download)
- Go to your project
.git/hooks
folder- Download a copy of the plantuml.pre-commit.sh
curl -O https://raw.githubusercontent.com/weikangchia/pre-commit-hooks-plantuml/main/plantuml.pre-commit.sh
- Make the file executable
chmod +x plantuml.pre-commit.sh
- Open your
pre-commit
file and add the following code to run plantuml.pre-commit.sh#!/bin/bash ... "$(git rev-parse --git-dir)/hooks/plantuml.pre-commit.sh"
- Download a copy of the plantuml.pre-commit.sh
During the commit of any PlantUML file (file with extension: .puml), if we
- add or update a PlantUML file, a PlantUML image will be generated based on the file and commit
- delete a PlantUML file, existing PlantUML image will be deleted together in the commit
Distributed under the MIT License. See LICENSE for more information.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
Wei Kang - weikangchia[@]gmail.com