Fixed isRelease flag.
This commit is contained in:
parent
33aa824ad9
commit
856a3688c0
1 changed files with 5 additions and 6 deletions
|
@ -27,7 +27,7 @@ description = "Pinboard Poster for Kotlin/Java"
|
||||||
val gitHub = "ethauvin/$name"
|
val gitHub = "ethauvin/$name"
|
||||||
val mavenUrl = "https://github.com/$gitHub"
|
val mavenUrl = "https://github.com/$gitHub"
|
||||||
val deployDir = "deploy"
|
val deployDir = "deploy"
|
||||||
var release = false
|
var isRelease = "release" in gradle.startParameter.taskNames
|
||||||
|
|
||||||
// Load local.properties
|
// Load local.properties
|
||||||
File("local.properties").apply {
|
File("local.properties").apply {
|
||||||
|
@ -129,7 +129,9 @@ tasks {
|
||||||
description = "Tags the local repository with version ${project.version}"
|
description = "Tags the local repository with version ${project.version}"
|
||||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||||
dependsOn(gitIsDirty)
|
dependsOn(gitIsDirty)
|
||||||
commandLine("git", "tag", "-a", project.version, "-m", "Version ${project.version}")
|
if (isRelease) {
|
||||||
|
commandLine("git", "tag", "-a", project.version, "-m", "Version ${project.version}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,7 +187,7 @@ tasks {
|
||||||
bintray {
|
bintray {
|
||||||
user = findProperty("bintray.user")
|
user = findProperty("bintray.user")
|
||||||
key = findProperty("bintray.apikey")
|
key = findProperty("bintray.apikey")
|
||||||
publish = release
|
publish = isRelease
|
||||||
setPublications(publicationName)
|
setPublications(publicationName)
|
||||||
pkg.apply {
|
pkg.apply {
|
||||||
repo = "maven"
|
repo = "maven"
|
||||||
|
@ -218,8 +220,5 @@ tasks {
|
||||||
description = "Publishes version ${project.version} to Bintray."
|
description = "Publishes version ${project.version} to Bintray."
|
||||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||||
dependsOn(bintrayUpload)
|
dependsOn(bintrayUpload)
|
||||||
doFirst {
|
|
||||||
release = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue