Skip to content

Commit

Permalink
Rename save-cosv module to cosv-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheshiriks committed Feb 20, 2024
1 parent 50aac70 commit 069b1fb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ fun Project.registerLiquibaseTask(profile: String) {
}

private fun Project.registerLiquibaseTask(projectName: String, relativeChangeLogFile: String, profile: String, mustRunAfterTask: String?): TaskProvider<Exec> {
val taskName = "liquibaseUpdate" + projectName.split("-").map { it.capitalized() }.joinToString("")
val taskName = getTaskName(projectName)
val credentials = getDatabaseCredentials(projectName, profile)

return tasks.register<Exec>(taskName) {

mustRunAfterTask?.let {
mustRunAfter("liquibaseUpdate" + it.split("-").map { it.capitalized() }.joinToString(""))
mustRunAfter(getTaskName(it))
}

val contexts = when (profile) {
Expand Down Expand Up @@ -91,6 +91,8 @@ private fun Project.registerLiquibaseTask(projectName: String, relativeChangeLog
}
}

private fun getTaskName(projectName: String) = "liquibaseUpdate" + projectName.split("-").map { it.capitalized() }.joinToString("")

/**
* @param profile deployment profile, used, for example, to start SQL database in dev profile only
*/
Expand Down

0 comments on commit 069b1fb

Please sign in to comment.