Fix publishing with missing github repository
This commit is contained in:
parent
cdb3651b58
commit
3bb6f63748
@ -6,7 +6,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "ru.mipt.npm"
|
||||
version = "0.7.3-1.4.30-RC"
|
||||
version = "0.7.4"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -13,6 +13,7 @@ import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
|
||||
class KSciencePublishingExtension(val project: Project) {
|
||||
var vcs: String? by project.extra
|
||||
var githubOrg: String? by project.extra
|
||||
var githubProject: String? by project.extra
|
||||
var spaceRepo: String? by project.extra
|
||||
|
@ -18,10 +18,10 @@ internal fun Project.configurePublishing() {
|
||||
val vcs = findProperty("vcs") as? String
|
||||
?: githubProject?.let { "https://github.com/$githubOrg/$it" }
|
||||
|
||||
if (vcs == null) {
|
||||
project.logger.warn("[${project.name}] Missing deployment configuration. Skipping publish.")
|
||||
return
|
||||
}
|
||||
// if (vcs == null) {
|
||||
// project.logger.warn("[${project.name}] Missing deployment configuration. Skipping publish.")
|
||||
// return
|
||||
// }
|
||||
|
||||
project.configure<PublishingExtension> {
|
||||
plugins.withId("org.jetbrains.kotlin.js") {
|
||||
@ -62,7 +62,7 @@ internal fun Project.configurePublishing() {
|
||||
publication.pom {
|
||||
name.set(project.name)
|
||||
description.set(project.description)
|
||||
url.set(vcs)
|
||||
vcs?.let{url.set(vcs)}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
@ -80,12 +80,14 @@ internal fun Project.configurePublishing() {
|
||||
}
|
||||
|
||||
}
|
||||
vcs?.let {
|
||||
scm {
|
||||
url.set(vcs)
|
||||
tag.set(project.version.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val githubUser: String? by project
|
||||
val githubToken: String? by project
|
||||
|
Loading…
Reference in New Issue
Block a user