Easy peasy git tag utility for lazy people who don't want to remember git commands.
Taggo handles the creation of lightweight tags and pushes them to the remote repository.
Tags are created with the format vX.Y.Z where X is the major version, Y is the minor version and Z is the patch version.
It also supports pre-release tags, tags without the v prefix, and automatic CHANGELOG.md management following the Keep a Changelog format.
If you have Go installed, you can use the go install command to install the binary.
go install github.com/jeorjebot/taggo@latestThe binary will be installed in $GOPATH/bin or $GOBIN if set.
Make sure you have $GOPATH/bin in your path.
If you're installing from a local clone, use just install to bake in the version number.
Download the binary for your OS from the releases page. Make sure the binary is executable, then move it to your path.
chmod +x /path/to/taggo
mv /path/to/taggo /usr/local/binOn macOS you can install via Homebrew Cask:
brew install --cask jeorjebot/tap/taggo| Command | Description |
|---|---|
taggo |
Show current tag |
taggo -v |
Show taggo version |
taggo init / taggo -i |
Initialize repo with first tag v0.0.0 |
taggo -I |
Initialize repo without v prefix (0.0.0) |
taggo -p |
Bump patch version (e.g. v1.0.0 -> v1.0.1) |
taggo -m |
Bump minor version (e.g. v1.0.0 -> v1.1.0) |
taggo -M |
Bump major version (e.g. v1.0.0 -> v2.0.0) |
taggo -t <tag> |
Create a specific tag (e.g. v1.0.0) |
taggo -n <name> |
Create a pre-release tag (e.g. v1.0.0-beta) |
taggo -d |
Delete last tag (local and remote) |
taggo -l |
List tags in the current branch with dates |
taggo --no-changelog |
Skip automatic CHANGELOG.md update |
- Show current tag
$ taggo
[*] Current tag: v1.0.0- Show taggo version
$ taggo -v
taggo v1.2.0- Initialize repo
$ taggo init
[*] Initializing git repo
[*] Added tag v0.0.0- Bump patch version
$ taggo -p
[*] Current tag: v1.0.0
[*] New tag: v1.0.1
[*] CHANGELOG.md updated: [Unreleased] -> [v1.0.1]
[*] CHANGELOG.md committed
[*] Tag pushed successfully- Create a specific tag
$ taggo -t v2.0.0
[*] Current tag: v1.0.1
[*] New tag: v2.0.0
[*] CHANGELOG.md updated: [Unreleased] -> [v2.0.0]
[*] CHANGELOG.md committed
[*] Tag pushed successfully- Create a pre-release tag
$ taggo -n beta
[*] Current tag: v1.0.0
[*] New tag: v1.0.0-beta
[*] CHANGELOG.md updated: [Unreleased] -> [v1.0.0-beta]
[*] CHANGELOG.md committed
[*] Tag pushed successfully- Delete last tag
$ taggo -d
[*] Current tag: v1.0.1
[*] Deleting tag v1.0.1
[*] Tag deleted successfully
[*] CHANGELOG.md reverted: [v1.0.1] -> [Unreleased]
[*] CHANGELOG.md committed- List tags in current branch
$ taggo -l
[*] Branch: main
v0.0.0 2023-04-29
v1.0.0 2023-04-30
v1.1.0 2023-05-02Taggo automatically manages a CHANGELOG.md file following the Keep a Changelog format.
On tag creation, the [Unreleased] section is moved into a new versioned section with the current date, and comparison links are updated.
On tag deletion, the deleted version's section is moved back into [Unreleased].
If no CHANGELOG.md exists, one is automatically scaffolded with the standard header and an empty [Unreleased] section.
To skip changelog management for a single command, use --no-changelog:
$ taggo -p --no-changeloggit rev-parse --is-inside-work-tree==> check if inside a git repogit remote -v==> check for remote origingit remote get-url origin==> get remote URLgit rev-parse --abbrev-ref HEAD==> get current branch namegit describe --tags --abbrev=0==> check if repo has tagsgit tag --sort=committerdate==> list tags sorted by date (last = most recent)git tag --sort=committerdate --format='%(refname:short) %(creatordate:short)'==> list tags with datesgit merge-base --is-ancestor <tag> HEAD==> check if tag is reachable from HEADgit tag v1.0.0==> create taggit push origin v1.0.0==> push tag to remotegit tag -d v1.0.0==> delete tag locallygit push origin --delete v1.0.0==> delete tag on remotegit add CHANGELOG.md==> stage changeloggit commit -m "message"==> commit changes
This project is licensed under the Apache License 2.0 - see the LICENSE file for details
- autotag for the inspiration
- gopherize.me for the gopher image
