-
Notifications
You must be signed in to change notification settings - Fork 66
/
run-sql.sh
executable file
·36 lines (30 loc) · 1.43 KB
/
run-sql.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
export MAVEN_OPTS="-Xms521M -Xmx1024M"
if [[ "$1" == "" ]] ; then
echo "Missing argument: correct usage <./run-sql.sh database>"
else
DATABASE=$1
echo "Database type: $DATABASE"
cd flowable-sql-7.0.1
if [[ "$DATABASE" == "oracle" ]] ; then
mvn -PupdateDb -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT clean install
else
mvn -PupdateDb -Ddatabase=$DATABASE clean install
fi
cd ..
cd flowable-sql-7.1.0
if [[ "$DATABASE" == "oracle" ]] ; then
mvn -PgenerateSql -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT -DoldVersion=7.0.1 -DnewVersion=7.1.0 clean install
mvn -PgenerateCreateSql -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT clean install
mvn -PcombineUpgradeSql -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT -DoldVersion=7.0.1 -DnewVersion=7.1.0 clean install
mvn -PcombineCreateSql -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT clean install
mvn -PdropAll -Ddatabasewithschema=$DATABASE -Duser.timezone=GMT clean install
else
mvn -PgenerateSql -Ddatabase=$DATABASE -DoldVersion=7.0.1 -DnewVersion=7.1.0 clean install
mvn -PgenerateCreateSql -Ddatabase=$DATABASE clean install
mvn -PcombineUpgradeSql -Ddatabase=$DATABASE -DoldVersion=7.0.1 -DnewVersion=7.1.0 clean install
mvn -PcombineCreateSql -Ddatabase=$DATABASE clean install
mvn -PdropAll -Ddatabase=$DATABASE clean install
fi
cd ..
fi