mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 11:38:45 +00:00
small refactoring
This commit is contained in:
parent
8b5244d8df
commit
8804a24013
25
build.gradle
25
build.gradle
@ -19,15 +19,6 @@ plugins {
|
|||||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" apply false
|
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
|
||||||
enable_github_publish=new File(projectDir, "secret.gradle").exists()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ext.enable_github_publish) {
|
|
||||||
apply from: './secret.gradle'
|
|
||||||
apply plugin: "com.github.breadmoirai.github-release"
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getCurrentVersionChangelog() {
|
private String getCurrentVersionChangelog() {
|
||||||
OutputStream changelogDataOS = new ByteArrayOutputStream()
|
OutputStream changelogDataOS = new ByteArrayOutputStream()
|
||||||
exec {
|
exec {
|
||||||
@ -38,8 +29,10 @@ private String getCurrentVersionChangelog() {
|
|||||||
return changelogDataOS.toString().trim()
|
return changelogDataOS.toString().trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable_github_publish && project.hasProperty('GITHUB_RELEASE_TOKEN')) {
|
if (new File(projectDir, "secret.gradle").exists()) {
|
||||||
String changelogFromFile = ""
|
apply from: './secret.gradle'
|
||||||
|
apply plugin: "com.github.breadmoirai.github-release"
|
||||||
|
|
||||||
githubRelease {
|
githubRelease {
|
||||||
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
||||||
|
|
||||||
@ -52,14 +45,4 @@ if (enable_github_publish && project.hasProperty('GITHUB_RELEASE_TOKEN')) {
|
|||||||
|
|
||||||
body getCurrentVersionChangelog()
|
body getCurrentVersionChangelog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// tasks.getByName("githubRelease").doFirst {
|
|
||||||
// OutputStream changelogDataOS = new ByteArrayOutputStream()
|
|
||||||
// exec {
|
|
||||||
// standardOutput = changelogDataOS
|
|
||||||
// commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
|
|
||||||
// }
|
|
||||||
// changelogFromFile = changelogDataOS.toString().trim()
|
|
||||||
// ext.changelog_from_file = changelogFromFile
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user