https://github.com/weikangchia/pre-commit-hooks-plantuml
A pre-commit script to manage your PlantUML file
https://github.com/weikangchia/pre-commit-hooks-plantuml
git plantuml plantuml-generator prehook
Last synced: about 1 month ago
JSON representation
A pre-commit script to manage your PlantUML file
- Host: GitHub
- URL: https://github.com/weikangchia/pre-commit-hooks-plantuml
- Owner: weikangchia
- License: mit
- Created: 2021-05-16T07:30:58.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-17T04:03:27.000Z (almost 5 years ago)
- Last Synced: 2025-10-12T09:38:23.728Z (9 months ago)
- Topics: git, plantuml, plantuml-generator, prehook
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pre-Commit PlantUML
## Getting Started
1. Install Java
2. Graphviz (Optional)
3. Go to your project directory and download a copy of plantuml.jar (https://sourceforge.net/projects/plantuml/files/plantuml.jar/download)
4. Go to your project `.git/hooks` folder
1. 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
```
2. Make the file executable
```
chmod +x plantuml.pre-commit.sh
```
3. 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"
```
## How It Works
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
## License
Distributed under the MIT License. See [LICENSE](license) for more information.
## Contributing
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.
## Contact
Wei Kang - weikangchia[@]gmail.com