-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.gradle
22 lines (16 loc) · 846 Bytes
/
dev.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.apache.tools.ant.filters.ReplaceTokens;
task deploy(type: Copy, dependsOn: 'build') {
delete deploy_location + "/openspecimen.war"
delete deploy_location + "/openspecimen-ds.xml"
from war
def mysql_url = 'jdbc:mysql://' + database_host + ':' + database_port + '/' + database_name
def oracle_url = 'jdbc:oracle:thin:@' + database_host + ':' + database_port + ':' + database_name
def database_url = (database_type == "mysql") ? mysql_url : oracle_url
def database_driver = (database_type == "mysql") ? mysql_driver : oracle_driver
from ('./') {
include 'openspecimen-ds.xml'
filter(ReplaceTokens, tokens: [database_url : database_url, username : database_username,
password : database_password, database_driver : database_driver])
}
into deploy_location
}