diff --git a/.travis.yml b/.travis.yml index 521ccb29..4a8de3cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ after_success: - docker push mgramin/sql-boot before_deploy: - - export TRAVIS_TAG=v0.4.0 + - export TRAVIS_TAG=v0.5.0 - git tag $TRAVIS_TAG --force deploy: @@ -35,9 +35,9 @@ deploy: api_key: $GITHUB_TOKEN file: - target/sql-boot.zip - - target/rpm/sql-boot/RPMS/noarch/sql-boot-0.4.0-1.noarch.rpm + - target/rpm/sql-boot/RPMS/noarch/sql-boot-0.5.0-1.noarch.rpm skip_cleanup: true - name: v0.4.0 + name: v0.5.0 overwrite: true on: tags: false diff --git a/pom.xml b/pom.xml index 53eb13ec..1dbe1153 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ com.github.mgramin.com.github.mgramin.sqlboot sql-boot - 0.4.0 + 0.5.0 jar sql-boot @@ -528,7 +528,7 @@ sql-boot-group - target/sql-boot-0.4.0.jar + target/sql-boot-0.5.0.jar sql-boot.jar diff --git a/src/main/assembly/assembly.xml b/src/main/assembly/assembly.xml index ca448496..c84e1e57 100644 --- a/src/main/assembly/assembly.xml +++ b/src/main/assembly/assembly.xml @@ -40,7 +40,7 @@ false - target/sql-boot-0.4.0.jar + target/sql-boot-0.5.0.jar sql-boot.jar 0764 diff --git a/src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt b/src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt index 53e28403..7ebf3c37 100644 --- a/src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt +++ b/src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt @@ -66,10 +66,17 @@ open class SimpleEndpoint( dataSource!! } else { val dataSourceNew = DataSource() + if (properties().containsKey("jdbc.url")) { + dataSourceNew.url = properties()["jdbc.url"].toString() + } else { + val jdbcProtocol = properties()["jdbc.protocol"] + val dbName = properties()["db.name"] + val dbPort = properties()["db.port"] + dataSourceNew.url = "$jdbcProtocol://$host:$dbPort/$dbName" + } dataSourceNew.driverClassName = properties()["jdbc.driver.class.name"].toString() - dataSourceNew.url = properties()["jdbc.url"].toString() - dataSourceNew.username = properties()["jdbc.user"].toString() - dataSourceNew.password = properties()["jdbc.password"].toString() + dataSourceNew.username = properties()["db.user"].toString() + dataSourceNew.password = properties()["db.password"].toString() dataSourceNew.minIdle = 1 dataSourceNew.maxActive = 3 dataSourceNew.maxIdle = 3