Skip to content

Commit

Permalink
Create changelog automatically from git commits
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Jun 1, 2016
1 parent 94312f8 commit f2061f4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1,043 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -19,4 +19,5 @@ run/
out/
.idea
build/*
/bin/
/bin/
changelog.html
24 changes: 24 additions & 0 deletions build.gradle
Expand Up @@ -13,6 +13,7 @@ buildscript {

plugins {
id "com.matthewprenger.cursegradle" version "1.0.7"
id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.32"
}

apply plugin: 'net.minecraftforge.gradle.forge'
Expand Down Expand Up @@ -66,6 +67,25 @@ processResources {
rename '(.+_at.cfg)', 'META-INF/$1'
}

task makeChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
filePath = "changelog.html"
untaggedName = "Current release ${project.version}"
fromCommit = "2fe051cf727adce1be210a46f778aa8fe031331e"
toRef = "HEAD"
templateContent = """
{{#tags}}
<h3>{{name}}</h3>
<ul>
{{#commits}}
<li>{{{message}}}</li>
{{/commits}}
</ul>
<br/>
<hr/>
{{/tags}}
"""
}

curseforge {
apiKey = project.hasProperty('curseforge_apikey') ? project.curseforge_apikey : '0'
project {
Expand All @@ -77,6 +97,10 @@ curseforge {
}
}

afterEvaluate {
tasks.curseforge238222.dependsOn.add(makeChangelog)
}

// prevent java 8's strict doclint for javadocs from failing builds
allprojects {
tasks.withType(Javadoc) {
Expand Down

0 comments on commit f2061f4

Please sign in to comment.