在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):tomasbjerre/git-changelog-maven-plugin开源软件地址(OpenSource Url):https://github.com/tomasbjerre/git-changelog-maven-plugin开源编程语言(OpenSource Language):Java 96.9%开源软件介绍(OpenSource Introduction):Git Changelog Maven PluginThis is a Maven plugin for Git Changelog Lib. UsageThere is a running example here. Have a look at the pom.xml where you will find some more examples. Here is and example that will generate a CHANGELOG.md when running <build>
<plugins>
<plugin>
<groupId>se.bjurr.gitchangelog</groupId>
<artifactId>git-changelog-maven-plugin</artifactId>
<version>${changelog}</version>
<executions>
<execution>
<id>GenerateGitChangelog</id>
<phase>generate-sources</phase>
<goals>
<goal>git-changelog</goal>
</goals>
<configuration>
<templateContent>
<![CDATA[
Template here!
]]>
</templateContent>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> Template - SimpleTemplate - Semantic versioning from conventional commitsIf you are using conventional commits: <type>[optional scope]: <description>
[optional body]
[optional footer(s)] A changelog can be rendered (using Helpers) like this: Example - custom helpersYou can add your own helpers and use them in the template. There are also built in Helpers. <build>
<plugins>
<plugin>
<groupId>se.bjurr.gitchangelog</groupId>
<artifactId>git-changelog-maven-plugin</artifactId>
<version>${changelog}</version>
<executions>
<execution>
<id>GenerateGitChangelog</id>
<phase>generate-sources</phase>
<goals>
<goal>git-changelog</goal>
</goals>
<configuration>
<javascriptHelper>
<![CDATA[
Handlebars.registerHelper('startsWith', function(messageTitle, options) {
const s = options.hash['s']
if (new RegExp('^' + s + '.*').test(messageTitle)) {
return options.fn(this);
} else {
return options.inverse(this);
}
});
Handlebars.registerHelper('firstLetters', function(from, options) {
const num = parseInt(options.hash['number'])
return from.substring(0,num)
});
]]>
</javascriptHelper>
<templateContent>
<![CDATA[
{{#commits}}
{{#startsWith messageTitle s='Removing'}}
Starts with Removing: "{{messageTitle}}"
first 10 letters of hash is: {{firstLetters hash number='10'}}
{{/startsWith}}
{{/commits}}
]]>
</templateContent>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> More documentation can be found in the Git Changelog Lib. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论