Le DSL pour créer un DatabaseUpdaterProperties depuis des Properties ou un fichier est maintenant publique.

Correction dans le fichier build.gradle.kts pour permettre le déploiement avec un CI_JOB_TOKEN.
This commit is contained in:
FyloZ 2021-03-05 16:50:57 -05:00
parent 3abc2c02c6
commit 853f27b845
2 changed files with 9 additions and 10 deletions

View File

@ -23,12 +23,6 @@ dependencies {
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("ch.qos.logback:logback-classic:1.0.13")
// Database drivers
runtimeOnly("com.h2database:h2:1.4.199")
runtimeOnly("mysql:mysql-connector-java:8.0.22")
runtimeOnly("org.postgresql:postgresql:42.2.16")
runtimeOnly("com.microsoft.sqlserver:mssql-jdbc:9.2.1.jre11")
testImplementation("io.mockk:mockk:1.10.6")
testImplementation("io.kotest:kotest-runner-junit5:4.4.1")
}
@ -48,8 +42,13 @@ publishing {
credentials(HttpHeaderCredentials::class.java) {
val gitlabPrivateToken: String? by project
name = "Private-Token"
value = gitlabPrivateToken ?: System.getenv("CI_JOB_TOKEN")
if (gitlabPrivateToken != null) {
name = "Private-Token"
value = gitlabPrivateToken
} else {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
}
authentication {
create<HttpHeaderAuthentication>("header")

View File

@ -59,7 +59,7 @@ fun databaseUpdaterProperties(
) = DatabaseUpdaterProperties(targetVersion, url, dbName, username, password).apply(op)
/** DSL for creating an instance of [DatabaseUpdaterProperties] from the given [properties]. */
internal fun databaseUpdaterProperties(
fun databaseUpdaterProperties(
properties: Properties,
op: DatabaseUpdaterProperties.() -> Unit = {}
) = with(properties) {
@ -80,7 +80,7 @@ internal fun databaseUpdaterProperties(
}
/** DSL for creating an instance of [DatabaseUpdaterProperties] from the given [file]. */
internal fun databaseUpdaterProperties(
fun databaseUpdaterProperties(
file: File,
op: DatabaseUpdaterProperties.() -> Unit = {}
) = databaseUpdaterProperties(