All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
6.9.0 - 2024-05-13
-
New flag
-target
that can be used to select to which component the version will be bumped to. Possible values aredev
(default),patch
,minor
andmajor
. E.g.$ git describe v6.8.1-16-gcf8b124 $ git-semver -target minor v6.9.0
-
Added devbox configuration
-
Introduced additional golangci-linters.
- Updated
git-go
to v5.11.0
- An error was issued when invoked from subfolder of the repository whereas
git-describe
usually succeeds in such cases.
6.8.0 - 2023-09-22
- New flag
-match
that can be used to select only specific tags matching a glob pattern into the calculation (e.g.git-describe -match "v1.2.*"
)
6.7.0 - 2023-05-08
- New flag
-no-prefix
to exclude the prefix (e.g. "v") from the printed version.
- Use the
-prefix
-flag to allow parsing non-standard version prefixes (e.g. "ver")
6.6.0 - 2023-05-08
- Upgrade Golang to 1.20 and update dependencies.
6.5.0 - 2022-06-24
- Use distroless/static:nonroot as
base image for the dockerized version of
git-semver
and build with Golang 1.18.
6.4.0 - 2022-06-24
-
If two annotated tags point to the same commit
git-semver
will now select the one that was created last. E.g.$ git tag -a -m "Release candidate" 1.1.0-rc.1 $ git-semver 1.1.0-rc.1 $ git tag -a -m "Final release" 1.1.0 $ git-semver 1.1.0
Previously the behavior was undefined. Thanks @igor-petrik-invitae for the issue report!
6.3.0 - 2022-05-20
-
git-semver
can now be installed with Homebrew$ brew install mdomke/git-semver/git-semver
6.2.0 - 2022-03-10
- Also build binaries for Windows
6.1.1 - 2021-09-16
- The ability to point
git-semver
to a different repository location was broken in 6.1.0 and has been fixed by @masonkatz.
6.1.0 - 2021-08-25
- A new flag
-guard
has been introduced to avoid accidentally overwriting production versions with a pre-release version. Consider that we have a tag1.2.3-rc.1
and invokegit-semver
with-no-patch
we would get the version1.2
, which would overwrite a previous version that was generated from the tag1.2.2
. The-guard
flag will enforce that the pre-release identifier is always included in the output regardless of the usage of shorthand options like-no-patch
,-no-pre
, etc.
6.0.3 - 2021-08-23
- The pre-release tag was parsed incorrectly if it included another dash. E.g.:
1.2.3-pre-release.1
This has been fixed by @ckoehn.
6.0.2 - 2021-07-13
- Upgrade Golang to 1.16 and
go-git
to 5.4.2 - Upgrade golangci-lint to
v1.41
and fix some linting errors. - Switch to
golang:1.16-buster
as builder-image
6.0.1 - 2020-12-08
- The default log sort-order was finding the wrong tag. Switching to commiter time based sorting improves the situation, but eventually the concrete algorithm from git describe has to be reimplemented.
6.0.0 - 2020-10-28
- Remove external dependency to git with a pure Go based implemenation.
5.0.0 - 2020-10-08
-
The SemVer compliance for "development versions" originating from a pre-release tag has been improved. Previously the pre-release version has been incremented before attaching the
dev.X
suffix. As pointed out by @choffmeister this results in a not compliant version sorting since1.2.3-rc.2.dev.1 > 1.2.3-rc.2
because a larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal 1. A development version originating from the tag
1.2.3-rc.1
will now result in1.2.3-rc.1.dev.1
. -
The dev-suffix added to a version that is derived from a tagged version is now formatted as
dev.X
. This will enforce proper sorting since dot-separted identifiers are compared individually and identifiers consisting only of digits will be compared numerically. So thatdev1 < dev10 < dev2
yields the wrong order whereas
dev.1 < dev.2 < dev.10
works as expected. Thanks @choffmeister.
-
The size of the docker image has been reduced to 25MB by @choffmeister.
-
The commonly used prefix "v" will be automatically detected by the parser now and the
-prefix
option is now only used to add a prefix that was not part of the tag before. -
Moved from Travis to GitHub Actions.
4.0.1 - 2020-06-05
- Publish binaries upon release @schorzz.
4.0.0 - 2020-04-10
- Use semantic import path versioning.
- Allow tags to have a manually configured buildmeta section. E.g.:
v4.0.2-dev6+special
.