Update README to enhance installation and usage instructions

This commit is contained in:
2026-01-18 14:21:33 +01:00
parent ffc9ccb8e4
commit 43375912d6

View File

@@ -2,19 +2,24 @@
Minimal tool to create and publish Git release tags following the vX.Y.Z format. Minimal tool to create and publish Git release tags following the vX.Y.Z format.
```bash
# Quick install
mkdir -p ${HOME}/.local/bin
wget -qO ${HOME}/.local/bin/git-release https://github.com/ObNitram/git-release/releases/latest/download/git-release
chmod +x ${HOME}/.local/bin/git-release
```
## Usage ## Usage
**Single project (default):** - From the repository root: `git release`
- From the repository root: `./git-release` or `git release` - Select release type: patch, minor, major, or cancel
- Creates tags in the format `vX.Y.Z` - Confirm the new version
- The script creates and pushes the new tag
**Multi-project:** ### Multi-project support
- From the repository root: `./git-release <projectname>` or `git release <projectname>`
- Creates tags in the format `<projectname>-vX.Y.Z`
- Useful for monorepos with multiple independent release cycles
The script creates an annotated tag and pushes it to the configured remote.
For repositories with multiple projects (monorepos), you can specify the project name as an argument:
`git release <projectname>` will create a tag with the following format `<projectname>-vX.Y.Z`
## Example ## Example
``` ```
@@ -41,13 +46,27 @@ $ git release
``` ```
## Installation ## Installation
- Make the script executable: `chmod +x git-release` It's a single script file:
- (Optional) Create a hard link in your PATH : - Download the `git-release` script from the repository.
`ln "$(pwd)/git-release" "$HOME/.local/bin/git-release"` - Make it executable: `chmod +x git-release`
- Place it in your PATH
It relies on the fact that if git does not find a command, it will look for a script named `git-<command>` in your PATH.
So you can now run `git release` from any git repository.
You can use the following commands to install it:
```bash
mkdir -p ${HOME}/.local/bin
wget -qO ${HOME}/.local/bin/git-release https://github.com/ObNitram/git-release/releases/latest/download/git-release
chmod +x ${HOME}/.local/bin/git-release
```
## Dependencies ## Dependencies
- git - git
## License ## License
- See the repository `LICENSE` file. - MIT License
- See the repository `LICENSE` file.