- Changelog
- [v0.9.1 - 2023-09-16](#v091---2023-09-16)
- [v0.9.0 - 2022-07-20](#v090---2022-07-20)
- [v0.8.0 - 2022-03-11](#v080---2022-03-11)
- [v0.7.0 - 2021-12-08](#v070---2021-12-08)
- [v0.6.3 - 2021-08-26](#v063---2021-08-26)
- [v0.6.2 - 2021-07-09](#v062---2021-07-09)
- [v0.6.1 - 2021-02-16](#v061---2021-02-16)
- [v0.6.0] - 2020/10/12
- [v0.5.2] - 2020/09/22
- [v0.5.1 - 2020/09/17](#v051---20200917)
- [v0.5.0 - 2020/09/17](#v050---20200917)
- [v0.4.0 - 2019/07/10](#v040---20190710)
- [v0.3.1 - 2019/12/16](#v031---20191216)
- [v0.3.0 - 2019/11/18](#v030---20191118)
- [v0.2.0 - 2019/11/15](#v020---20191115)
- [v0.1.2 - 2019/10/14](#v012---20191014)
- [v0.1.1 - 2019/10/12](#v011---20191012)
- [v0.1.0 - 2019/10/11](#v010---20191011)
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.
v0.9.1 - 2023-09-16
-
gotagger
now returns a minimum version based on the Go module version.For instance, if you bump a module from v1 to v2,
gotagger
will begin reporting the version asv2.0.0
. #211
v0.9.0 - 2022-07-20
-
This release of
gotagger
removes the deprecated git and marker packages, and the TagRepo public function that used them.gotagger
is on it's 4th release since these were deprecated, and a v1.0.0 release is probably not far off. This is a good time to make this breaking change. #105
- Added a
Force
option togotagger.Config
and a corresponding-force
flag to the CLI. Setting this totrue
forces the creation of a tag, even if the HEAD is not a "release" commit. #11 gotagger
now takes a-path
flag that restricts version calculation to commits that affected files below that directory. #93
-
Fixed an issue where
gotagger
could not version the first commit. #103 -
Fixed an issue where
gotagger
would return an error versioning a go module that was not yet tagged. #104 -
gotagger
error output is now correctly written to stderr.The error output of the CLI was incorrectly sent to stdin. #61
-
gotagger
properly parses scopes with hyphens.The regex used by gotagger is now essentially the same as the default used by conventional-commit-parser. #95
-
The minimum version of go is now 1.17. Go 1.18 was released on 2022-03-15, which means go 1.16 is now EOL.
The go version in the go.mod is updated to 1.17, so that gotagger can take advantage of the depdnency pruning changes introduced in that version of go. Generally, this is not desirable, but this time the benefits are worth the potential disruption. #54
- Set the git author name and email when generating tags.
v0.8.0 - 2022-03-11
- Add a feature allowing users to configure semantic version increments. This is done by way of a config file, which is optionally passed to Gotagger. #30
v0.7.0 - 2021-12-08
- Drop support for building
gotagger
with go 1.15 now that it is no longer supported. #20 - Add a way to change how
gotagger
increments the version when there are no new commits, but the worktree is dirty. For the CLI, use the-dirty
option. Go API users, setConfig.DirtyWorktreeIncrement
. #24
v0.6.3 - 2021-08-26
-
Fixed a bug where
gotagger
calculated the wrong major version for go modules.When finding the latest tag for a go module,
gotagger
was only considering tags that matched the major version of the module. This causedgotagger
to essentially always calculate the version asv1.0.0
. The filtering was changed to only filter out tags whose major version are greater than the module version. #17
v0.6.2 - 2021-07-09
- Fix a bug in how
gotagger
calculates the version when a commit contains changes to more than one go module. #12
- Run
make release
as part of validating PR. This should catch invalid release commits, and other issues that could cause a release to fail.
v0.6.1 - 2021-02-16
-
When creating repositories during tests, configure the user name and email to avoid failures in CI. #1
-
The way gotagger was determining the path of a module relative to the root of the repository did not work correctly for Windows paths.
This fixes the problem by using the
filepath.Rel
call instead. #3 -
Gotagger.Version()
now reports the correct version when there are commits to multiple go modules. #4 -
Change the module name to
github.com/sassoftware/gotagger
.We need to use this module name until the sassoftware.io URL is ready. #7
- Added an
IgnoreModules
option, and matching-modules
flag, to control whethergotagger
enforces go module versioning. This allows non-golang projects to use a go.mod for build tooling but opt-out of module versioning rules.
- When running gotagger on windows the path to the root module was
\
. - Ensure gotagger uses
/
characters in module prefixes and not\
when deriving the module prefix from the module path.
- ModuleVersions does not validate release commits. This behavior prevented using ModuleVersions to report the version of modules not in the release commit.
v0.5.1 - 2020/09/17
- Removed remaining use of github.com/go-git/go-git outside of the test suite.
v0.5.0 - 2020/09/17
-
Add an
ExcludeModules
option toConfig
.This is a list of module names or whole paths to ignore.
-
Add a
PreMajor
option toConfig
.When
PreMajor
is true,gotagger
will not rev the major version to 1, even if commits are flagged as breaking changes. This has no effect if the major version is 1 or higher. -
TagRepo
andModuleVersions
validate that a release commit references only modules that are changed by the commit and that the commit references all of the changed modules. -
Add a
ModuleVersions
function that takes a variadic list of module names, and returns the versions of those modules, or all modules if called with no arguments. -
Add a
Version
function that returns the version of the project.In a multi-module repository,
Version
returns the version of the first module found. -
Add support for tagging any go module via release commits.
A release commit may contain a
Modules
footer that is a comma-separated list of module names for gotagger to tag.
Gotagger
no longer ignores all non-root go modules when given a relative path.- Correctly set
CreateTag
option totrue
when-push
flag is used. gotagger
correctly ignores directories namedtestdata
and directories that begin with.
and_
when looking for go modules.
-
Rewrite git and conventional commit parsing.
This is preparing for full go module support. The existing commit parsing and git repository interactions won't scale to solve the problem of tagging modules. These packages will remain until the v1.0.0 release of
gotagger
.
v0.4.0 - 2019/07/10
- The
gotagger
cli now takes-remote
and-prefix
options to set the name of the remote to push to and the version prefix, respectively.
gotagger
only considers tags that match the version prefix when determining the base version.
v0.3.1 - 2019/12/16
gotagger
no longer reports all git command failures as "not a git repository".
v0.3.0 - 2019/11/18
- The base package now exposes a
Config
struct and aTagRepo
function that preforms the basic operations ofgotagger
.
v0.2.0 - 2019/11/15
- Add
-push
and-release
flags to control whengotagger
tags a release commit and pushes the commit. - Source options from
GOTAGGER_
-prefixed environment variables.
- When tagging a release commit, increment the patch version if there are no feat or fix commits since the last release.
v0.1.2 - 2019/10/14
- Use
--merged
argument togit tag
so that we only generate tags that point to parents of HEAD.
v0.1.1 - 2019/10/12
- Always create annotated tags, otherwise we can't find our own tags.
- Call
git log
with the--decorate=full
option, so that tags are properly prefixed withrefs/tags/
- Remove unnecessary quotes from
git tag
format. These were being included in the formatted string. - Address a bug in the cli where we tried to do a release when HEAD is already tagged.
v0.1.0 - 2019/10/11
- git package for interacting with git repository
- marker package for parsing commit markers
- basic cli capability: printing the new version and tagging a repo