Skip to content

v0.1.75

Compare
Choose a tag to compare
@ap0llo ap0llo released this 12 Apr 15:26

Change Log

0.1.75

New Features

Bug Fixes

Details

Add commit message parser

Add a parser for commits following the "Conventional Commits" specification.

Generate changelog from a Git repositoy

Add generation of a changelog from a git repository. The changelog is generated as Markdown document and includes all "feat" and "fix" changes as well as any change that is marked as breaking change. The versions are determined based on the repository's tags.

Add configuration file infrastructure

Add infrastructure for configuration of changelog generation.
Configuration can be placed in a json file named "changelog.settings.json" in the repository root directory.
The configuration file is optional. If file does not exist, the default settings are used.

Configuration is implemented using Microsoft.Extensions.Configuration and uses the "layered" approach.
A settings file must not specify all settings but only the settings that are different from the default settings.
At runtime, both the default settings and the settings in the repository are "merged" together.

Add option to configure display names for scopes

Add option to specify a display name for scopes in the configuration file.
When a display name for a scope is configured, it is used in the output Markdown instead if the scope name.

Add setting for the Markdown preset to use

Add option to specify a "Markdown preset" in the configuration file.
The preset controls some serialization options for Markdown files (e.g. escaping and indentation settings).
Supported values are "default" and "MkDocs" which produces Markdown that's optimized for being used in a MkDocs website.

Add setting to customize parsing of tag names

Add "tagPatterns" setting that specifies one or more regular expressions that are used to get a version string from a tag name.
The default patterns allow parsing of tag names that are semantic versions or tag names that are semantic versions prefixed with 'v'

Add option to specify output path in the configuration file

Add "outputPath" setting that defaults to "changelog.md". When the output path in the configuration file is a relative path, it is interpreted as being relative to the repository directory.

In turn, make the output path command line parameter optional. When output path is specified on command line it overrides the output path in any configuration file.

Include footers in output

Include commit message footers in the output markdown document.
Add a "footers" setting to configure display names of footer names (analoguous to scope display names)

Add GitHub integration

Add GitHub integration. When enabled, adds links to the GitHub website to commit ids and recognizes references to GitHub issues/pull requests in footers.

Theoretically the integration should work with GitHub Enterprise, but the feature was only tested against github.com.

Add Logging to all tasks

Add logging to all tasks that run during changelog generatino.
All log messages are written to the Console. By default, only "Info", "Warning" and "Error" messages are logged, more detailed output can be enabled using the '--verbose' commandline switch

Add option to filter changelog

Add versionRange setting and command line parameter that allows limiting the changelog to certain versions.
The value of the setting is interpreted as "version range" and uses the NuGet version range notation.

To limit the changelog to a single version, e.g. 1.2 use a version range of '[1.2]'

Pack as .NET (global) tool

Rename main assembly to "changelog" and pack as .NET SDK tool.

Add .NET Core 2.1 target

Multi-target the application and tests to both .NET Core 2.1 and 3.1, both as LTS versions

Add GitLab integration

Add GitLab integration. When enabled, adds links to the website to commit ids and recognizes references to GitLab issues, merge requests and milestones in footers.

Add option to include current version in the changelog

Add 'currentVersion' setting and commandline parameter. When current version is set, it is assumed to be the version of the repository's currently checked-out commit and the version is included in the generated changelog in addition to the versions read from the repository's tags.

Setting the current version is equivalent to tagging the current commit with the version.

Add support for environment variable configuration

Environment variables use the .NET Core / ASP.NET Core configuration system and thus the same naming conventions. Hierarchical keys are separated through '__' instead of ':' and are prefixed with 'CHANGELOG__'. E.g. to set the access token for the GitHub integration, set the variable "CHANGELOG__INTEGRATIONS__GITHUB__ACCESSTOKEN".

Settings from environment variables take precedence over values from the settings file but can might be overridden through commandline parameters.

Improve validation of command line parameters

Show more detailed error messages when invalid command line parameters were specified.
When the optional parameters 'currentVersion' and 'versionRange' were set, their values must be a valid version respectively version range.

Add '--configurationPath' commandline parameter

Add commandline parameter '--configurationPath' that allows specifying the path of the configuration file to use.

The parameter is optional. If no path is specified, changelog will continue to look for a file named 'changelog.settings.json' in the repository directory and load it if it exists.

Rename 'configurationPath' command line parameter to 'configurationFilePath'

Include leading '#' in footer descriptions

Adjust parsing of footers to include the leading '#' in the footer description instead of dropping it.
Whit this in footers like "Closes #23", the value is a valid issue reference ('#23')

Ignore leading and trailing whitespace in footers for detection of GitLab and GitHub references

Ignore duplicate versions

Versions loaded from git tags can be ambiguous because git only ensures the tag name is unique but different semantic version strings might be the same version after normalization. Furthermore, the version parser allows tags to be prefixed and suffixed.

To avoid issues, only the version from the first parsed tag will be used. When a tag is parsed and another parsed tag name yielded the same version, the subsequently processed tag will be ignored. When a duplicate tag is encountered, a warning will be written to the log.