https://github.com/thegeeklab/tag-sv
Create tags from SemVer version string
https://github.com/thegeeklab/tag-sv
cli git tools
Last synced: 2 months ago
JSON representation
Create tags from SemVer version string
- Host: GitHub
- URL: https://github.com/thegeeklab/tag-sv
- Owner: thegeeklab
- License: mit
- Created: 2024-12-09T20:08:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-22T09:03:47.000Z (3 months ago)
- Last Synced: 2026-04-22T11:12:47.360Z (3 months ago)
- Topics: cli, git, tools
- Language: Go
- Size: 177 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# tag-sv
Create tags from SemVer version string
[](https://ci.thegeeklab.de/repos/thegeeklab/tag-sv)
[](https://goreportcard.com/report/github.com/thegeeklab/tag-sv)
[](https://github.com/thegeeklab/tag-sv/graphs/contributors)
[](https://github.com/thegeeklab/tag-sv/blob/main/LICENSE)
Simple tool to create a list of tags from a given SemVer version string.
## Installation
Prebuilt multiarch binaries are available for Linux only.
```Shell
curl -SsfL https://github.com/thegeeklab/tag-sv/releases/latest/download/tag-sv-linux-amd64 -o /usr/local/bin/tag-sv
chmod +x /usr/local/bin/tag-sv
```
## Build
Build the binary from source with the following command:
```Shell
make build
```
## Usage
```Shell
$ tag-sv --help
NAME:
tag-sv - Create tags from SemVer version string
USAGE:
tag-sv [global options] command [command options] VERSION
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--output-file value path to write the tags output (default: stdout) [$TAG_SV_OUTPUT_FILE]
--suffix value add a suffix to all tags [$TAG_SV_SUFFIX]
--suffix-strict only output tags with suffixes when suffix is set (default: false) [$TAG_SV_SUFFIX_STRICT]
--extra-tags value additional tags to include, comma-separated [$TAG_SV_EXTRA_TAGS]
--force-latest always include 'latest' tag in output (default: false) [$TAG_SV_FORCE_LATEST]
--ignore-pre ignore pre-release and always get the full tag list (default: false) [$TAG_SV_IGNORE_PRERELEASE]
--help, -h show help
```
## Examples
```Shell
$ tag-sv "1.0.1"
# 1.0.1,1.0,1
$ tag-sv "0.1.0"
# 0.1.0, 0.1
## 'v' prefixes e.g. from git tags will be removed
$ tag-sv "v1.0.1"
# 1.0.1,1.0,1
## unsufficient semver version strings will be tried to convert automatically
## if conversion doesn't work return 'latest'
$ tag-sv "1.0"
# 1.0.0,1.0,1
$ tag-sv "1.0.0-beta"
# 1.0.0-beta
## ignore prerelease to always get a full list of tags
$ tag-sv --ignore-pre "1.0.0-beta"
# 1.0.0-beta,1.0.0,1.0,1
$ tag-sv --suffix amd64 "1.0.0"
# 1.0.0,1.0,1,1.0.0-amd64,1.0-amd64,1-amd64
$ tag-sv --suffix amd64 --suffix-strict "1.0.0"
# 1.0.0-amd64,1.0-amd64,1-amd64
$ tag-sv --extra-tags extra1,extra2 "1.0.0"
# 1.0.0,1.0,1,extra1,extra2
```
## Contributors
Special thanks to all [contributors](https://github.com/thegeeklab/tag-sv/graphs/contributors). If you would like to contribute, please see the [instructions](https://github.com/thegeeklab/tag-sv/blob/main/CONTRIBUTING.md).
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/thegeeklab/tag-sv/blob/main/LICENSE) file for details.