ci: Update changelog scripts

This commit is contained in:
Sekwah 2021-05-14 02:06:23 +01:00
parent a20028d9fc
commit 4ab2e2bd7a
No known key found for this signature in database
GPG Key ID: C3BE2E6C861A461A
1 changed files with 30 additions and 4 deletions

View File

@ -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()
}
}
}
}