2020-10-02 14:45:16 +00:00
|
|
|
private String getCurrentVersionChangelog() {
|
|
|
|
OutputStream changelogDataOS = new ByteArrayOutputStream()
|
2020-10-16 15:36:01 +00:00
|
|
|
exec {
|
|
|
|
commandLine 'chmod', "+x", './changelog_parser.sh'
|
|
|
|
}
|
2020-10-02 14:45:16 +00:00
|
|
|
exec {
|
|
|
|
standardOutput = changelogDataOS
|
2020-10-16 15:36:01 +00:00
|
|
|
commandLine './changelog_parser.sh', "${project.version}", 'CHANGELOG.md'
|
2020-10-02 14:45:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return changelogDataOS.toString().trim()
|
|
|
|
}
|
|
|
|
|
|
|
|
if (new File(projectDir, "secret.gradle").exists()) {
|
|
|
|
apply from: './secret.gradle'
|
|
|
|
apply plugin: "com.github.breadmoirai.github-release"
|
|
|
|
|
|
|
|
githubRelease {
|
|
|
|
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
|
|
|
|
2024-01-16 06:38:53 +00:00
|
|
|
owner = "InsanusMokrassar"
|
|
|
|
repo = "MicroUtils"
|
2020-10-02 14:45:16 +00:00
|
|
|
|
2024-01-16 06:38:53 +00:00
|
|
|
tagName = "v${project.version}"
|
|
|
|
releaseName = "${project.version}"
|
|
|
|
targetCommitish = "${project.version}"
|
2020-10-02 14:45:16 +00:00
|
|
|
|
2024-01-16 06:38:53 +00:00
|
|
|
body = getCurrentVersionChangelog()
|
2020-10-02 14:45:16 +00:00
|
|
|
}
|
|
|
|
}
|