Skip to content

Commit

Permalink
ci: Update changelog scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekwah committed May 14, 2021
1 parent a20028d commit 4ab2e2b
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,36 @@ task runJar() {
}
}

task updateChangelog(type: Exec) {
commandLine 'cmd', '/c', 'npx standard-version'
ext.output = {
return standardOutput.toString()
/**
* These are needed as standard-version doesnt allow for the ability to skip tag versions for the changelog.
* Well it does but not on purpose and it breaks things.
*/
task updateChangelog {
doLast{
exec {
commandLine 'cmd', '/c', 'npx standard-version -t (v)[0-9]+.[0-0]+.[0-0]+(?!-) --skip.tag --skip.bump --skip.commit'
ext.output = {
return standardOutput.toString()
}
}
exec {
commandLine 'cmd', '/c', 'git add CHANGELOG.md'
ext.output = {
return standardOutput.toString()
}
}
exec {
commandLine 'cmd', '/c', 'git commit -m "chore(changelog): Update CHANGELOG.md with full release notes.'
ext.output = {
return standardOutput.toString()
}
}
exec {
commandLine 'cmd', '/c', 'npx standard-version --skip.changelog'
ext.output = {
return standardOutput.toString()
}
}
}
}

Expand Down

0 comments on commit 4ab2e2b

Please sign in to comment.