A Gradle plugin which writes a markdown formatted changelog file based on conventional changelog syntax git commits.
Conventional Changelog is a commit convention defined and used by AngularJS. It aims at producing more usefull changelogs trimming unimportant commits out of the changelog. For this purpose a set of simple and easy to use conventions are used. The full commit convention can be read here
Add the plugin to your buildscript
's dependencies
section:
classpath 'com.github.marcpoppleton:git-changelog:0.1.3'
Apply the changelog
plugin:
apply plugin: 'changelog'
Commit using the conventional changelog convention and call the changelog
Gradle task!
Configuration of the changelog
task is optionnal, if none is provided the defaults settings will be used. Default values are detailed below.
changelog {
//the name of the file where to write the changelog.
file “CHANGELOG.md” //Defaults to "CHANGELOG.md"
//the name of the app/project for which you are generating a changelog.
appName “gradle-changelog-plugin” //Defaults to an empty string.
//version number for this changelog
versionNum “0.1.3” //Guesses next version using commits content and defaults to an empty string.
//version name
versionText “Electric Lama” //Defaults to an empty string.
//URL of the repository where the commits can be found. Plugin will append /commits at the end.
repoUrl “https://github.com/marcpoppleton/gradle-changelog-plugin” //Defaults to an empty string.
//URL of the bug tracker where closed issues can be found. Plugin will append /issues at the end.
trackerUrl “https://github.com/marcpoppleton/gradle-changelog-plugin” //Defaults to an empty string.
//lower limit to filter the git log command
from “0.0.1” //Defaults to previous git tag found or first commit if none found.
//upper limito filter the git log command.
to “HEAD” //Defaults to HEAD.
//regex used to filter the conventional changelog commits for this changelog
match “^fix|^feat|^fix|^perf|^refactor|BREAKING” //Defaults to the value in the example.
}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Improves previous tag detection by searching latest tagged commit across all branches. New logic for guessing next version using conventional commits tags present. (9ce3e04d)
- issues ref can be in a oneliner commit message. Several issues can be closed in one message. Supports wider closing wording (007bb752)
- line return after each commit in sections without commit links printed (1a9b1942)
- GitHubService: project obj should be passed to service (cd0b3647)
- regexp: add the refactor tag to the default filter regexp (e9f2e37f)
- added suppor of version name with param subtitle (572d0dd7)
- build: add self changelog plugin (ab8505ca)
- move regexp for isolating fixes in a method
- etracted string templates out methods
- GitChangelogTask: separate logic ina service and add unit tests