Skip to content

Commit fe4d2e1

Browse files
committed
1 parent f41cece commit fe4d2e1

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ after_success:
2626
- docker push mgramin/sql-boot
2727

2828
before_deploy:
29-
- export TRAVIS_TAG=v0.4.0
29+
- export TRAVIS_TAG=v0.5.0
3030
- git tag $TRAVIS_TAG --force
3131

3232
deploy:
@@ -35,9 +35,9 @@ deploy:
3535
api_key: $GITHUB_TOKEN
3636
file:
3737
- target/sql-boot.zip
38-
- target/rpm/sql-boot/RPMS/noarch/sql-boot-0.4.0-1.noarch.rpm
38+
- target/rpm/sql-boot/RPMS/noarch/sql-boot-0.5.0-1.noarch.rpm
3939
skip_cleanup: true
40-
name: v0.4.0
40+
name: v0.5.0
4141
overwrite: true
4242
on:
4343
tags: false

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<groupId>com.github.mgramin.com.github.mgramin.sqlboot</groupId>
3232
<artifactId>sql-boot</artifactId>
33-
<version>0.4.0</version>
33+
<version>0.5.0</version>
3434
<packaging>jar</packaging>
3535

3636
<name>sql-boot</name>
@@ -528,7 +528,7 @@
528528
<groupname>sql-boot-group</groupname>
529529
<sources>
530530
<source>
531-
<location>target/sql-boot-0.4.0.jar</location>
531+
<location>target/sql-boot-0.5.0.jar</location>
532532
<destination>sql-boot.jar</destination>
533533
</source>
534534
</sources>

src/main/assembly/assembly.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<includeBaseDirectory>false</includeBaseDirectory>
4141
<files>
4242
<file>
43-
<source>target/sql-boot-0.4.0.jar</source>
43+
<source>target/sql-boot-0.5.0.jar</source>
4444
<destName>sql-boot.jar</destName>
4545
<fileMode>0764</fileMode>
4646
</file>

src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,17 @@ open class SimpleEndpoint(
6666
dataSource!!
6767
} else {
6868
val dataSourceNew = DataSource()
69+
if (properties().containsKey("jdbc.url")) {
70+
dataSourceNew.url = properties()["jdbc.url"].toString()
71+
} else {
72+
val jdbcProtocol = properties()["jdbc.protocol"]
73+
val dbName = properties()["db.name"]
74+
val dbPort = properties()["db.port"]
75+
dataSourceNew.url = "$jdbcProtocol://$host:$dbPort/$dbName"
76+
}
6977
dataSourceNew.driverClassName = properties()["jdbc.driver.class.name"].toString()
70-
dataSourceNew.url = properties()["jdbc.url"].toString()
71-
dataSourceNew.username = properties()["jdbc.user"].toString()
72-
dataSourceNew.password = properties()["jdbc.password"].toString()
78+
dataSourceNew.username = properties()["db.user"].toString()
79+
dataSourceNew.password = properties()["db.password"].toString()
7380
dataSourceNew.minIdle = 1
7481
dataSourceNew.maxActive = 3
7582
dataSourceNew.maxIdle = 3

0 commit comments

Comments
 (0)