-
Notifications
You must be signed in to change notification settings - Fork 5
/
upgrade_mvp.sh
executable file
·14 lines (12 loc) · 1.17 KB
/
upgrade_mvp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -e
mysql -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); SET GLOBAL max_allowed_packet=100000000;" -h 127.0.0.1 -uroot -proot
mysql -e "DROP DATABASE IF EXISTS liquibaserunner; CREATE DATABASE liquibaserunner CHARACTER SET utf8 COLLATE utf8_general_ci;" -h 127.0.0.1 -uroot -proot
if [ "$TWO_STEP" = "true" ]; then
mvn install -e -q $PROFILE -Dtest=UpgradeMVPTest -DfailIfNoTests=false -Dopenmrs.version="2.3.0" -Ddb.user="root" -Ddb.password="root" -Dmvp.step=1 -Dmvp.file="${GITHUB_WORKSPACE}/openmrs_concepts_1_11.zip"
mvn install -e -q $PROFILE -Dtest=UpgradeMVPTest -DfailIfNoTests=false -Dopenmrs.version="$OPENMRS_VERSION" -Ddb.user="root" -Ddb.password="root" -Dmvp.step=2 -Dmvp.file="${GITHUB_WORKSPACE}/openmrs_concepts_1_11.zip"
else
mvn install -e -q $PROFILE -Dtest=UpgradeMVPTest -DfailIfNoTests=false -Dopenmrs.version="$OPENMRS_VERSION" -Ddb.user="root" -Ddb.password="root" -Dmvp.file="${GITHUB_WORKSPACE}/openmrs_concepts_1_11.zip"
fi
mysqldump -h 127.0.0.1 -uroot -proot --column-statistics=0 liquibaserunner > "openmrs_concepts_$FILE_SUFFIX.sql"
zip "openmrs_concepts_$FILE_SUFFIX.zip" "openmrs_concepts_$FILE_SUFFIX.sql"