Skip to content

Commit

Permalink
fix: insert changelog #20
Browse files Browse the repository at this point in the history
  • Loading branch information
rising3 committed Jan 13, 2022
1 parent 9d0f7b7 commit c285c3e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ class SemVerTask extends DefaultTask {
if (ChangeLog.FILE == project.semver.changeLog || ChangeLog.BOTH == project.semver.changeLog) {
final changelog = Paths.get("$project.rootDir/CHANGELOG.md")
final changelogBak = Paths.get("${changelog}.bak")
def tmp = Files.exists(changelog) ? changelog.getText('UTF-8') : ''
if (Files.exists(changelog) && !project.semver.noBackupChangelog) {
Files.copy(changelog, changelogBak, StandardCopyOption.REPLACE_EXISTING)
}
def tmp =Files.exists(changelogBak) ? changelogBak.getText('UTF-8') : ''
changelog.withWriter 'UTF-8', {it << logBody + tmp }
files.push(changelog.getFileName().toString())
}
Expand Down

0 comments on commit c285c3e

Please sign in to comment.