Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joemasilotti/git-auto-tagger
Tag commits based on a YAML file.
https://github.com/joemasilotti/git-auto-tagger
Last synced: 29 days ago
JSON representation
Tag commits based on a YAML file.
- Host: GitHub
- URL: https://github.com/joemasilotti/git-auto-tagger
- Owner: joemasilotti
- License: mit
- Created: 2022-11-14T13:34:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-14T16:37:31.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T05:25:17.982Z (6 months ago)
- Language: Ruby
- Size: 1.95 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-auto-tagger
Tag commits based on the commit message. Useful if you rebase often and don't want to manually clean up tags every time.
I'm using this for a workshop I run. Attendees check out code at phases and I rebase often to keep the history clean.
> **WARNING**: This will delete any existing local and remote tags.
> Make sure **all** the tags you want to keep are in the YAML file.## Requirements
Ruby 3.1.2
## Usage
1. Add a `.tags.yml` file to your project
1. Run `./auto-tag.sh` from your project's directory## `.tags.yml` format
```yaml
- tag: TAG_NAME
commit: COMMIT_MESSAGE
message: OPTIONAL_TAG_ANNOTATION
```For example:
```yaml
- tag: 0.1.0
commit: Set version to 0.1.0
- tag: 0.2.0
commit: Bump minor version
message: Add dynamic indexing
```1. Finds the 'Set version to 0.1.0' commit and sets the tag to '0.1.0'.
1. Finds the 'Bump minor version' commit and sets the tag to '0.2.0' with a message."