Link to wiki changelog

This commit is contained in:
embeddedt 2023-08-03 11:53:49 -04:00
parent ac827a0f42
commit 81ebcc8186
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 10 additions and 4 deletions

View File

@ -166,17 +166,19 @@ tasks.withType(JavaCompile) {
task generateChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { task generateChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
def details = versionDetails(); def details = versionDetails();
def theVersionRef
if(details.commitDistance > 0) { if(details.commitDistance > 0) {
fromRef = details.lastTag; theVersionRef = details.lastTag;
} else { } else {
def secondLastTagCmd = "git describe --abbrev=0 " + details.lastTag + "^" def secondLastTagCmd = "git describe --abbrev=0 " + details.lastTag + "^"
def secondLastTag = secondLastTagCmd.execute().text.trim() def secondLastTag = secondLastTagCmd.execute().text.trim()
fromRef = secondLastTag; theVersionRef = secondLastTag;
} }
fromRef = theVersionRef
file = new File("CHANGELOG.md"); file = new File("CHANGELOG.md");
def otherTemplateContent = new File('gradle/changelog.mustache').getText('UTF-8'); templateContent = new File('gradle/changelog.mustache').getText('UTF-8').replace("[[modernFixVersionRef]]", theVersionRef);
templateContent = "## Changes since " + fromRef + "\n" + otherTemplateContent;
toCommit = "HEAD"; toCommit = "HEAD";
} }

View File

@ -1,3 +1,7 @@
Depending on the size of this release, there may be a human-readable changelog available on [the wiki page](https://github.com/embeddedt/ModernFix/wiki/Changelog).
## Changes since [[modernFixVersionRef]]
{{#commits}} {{#commits}}
{{#ifMatches messageTitle "^(?!Merge).*"}} {{#ifMatches messageTitle "^(?!Merge).*"}}
* [{{{messageTitle}}}](https://github.com/embeddedt/ModernFix/commit/{{hashFull}}) - {{{authorName}}} * [{{{messageTitle}}}](https://github.com/embeddedt/ModernFix/commit/{{hashFull}}) - {{{authorName}}}