From 9032f0d81c03d2730af050aef68fa061023b3b0d Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 11 Dec 2023 23:52:26 +0100 Subject: [PATCH] =?UTF-8?q?Makefile=20hinzuf=C3=BCgen=20f=C3=BCr=20oft=20a?= =?UTF-8?q?uszuf=C3=BChrende=20Operationen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f25cdde --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +SHELL := /bin/bash + +info: + @echo "Achtung: nur auf Entwicklungs- und Testservern einsetzen!" + @echo "make build: build the jar files" + @echo "make psql: start psql shell on the database" + @echo "make resetdata: reset the data in the database" + @echo "make run: run catalina and watch the output" + @echo "make test: run all continuous integration tests" + @echo "make testdomain: run one specific test for domains" + +build: + source ~/.profile + cd ~/hsadmin/util && mvn clean install + cd ~/hsadmin/qserv && mvn clean install + cd ~/hsadmin/hsarback && mvn package -DskipTests + cp ~/hsadmin/qserv/target/hsadmin-*.jar ~/tomcatmq/webapps/hsar/WEB-INF/lib/ + cp ~/hsadmin/util/target/hsadmin-*.jar ~/tomcatmq/webapps/hsar/WEB-INF/lib/ + + +resetdata: + psql -U tim03_hsatest < ~/hsadmin/hsarback/database/dropschema.sql + psql -U tim03_hsatest < ~/hsadmin/hsarback/database/schema.sql + psql -U tim03_hsatest < ~/hsadmin/hsarback/database/data.sql + +test: resetdata + source ~/.profile + cd ~/hsadmin/hsarback && mvn test -Dtest=ContinuousIntegrationTest + +testdomain: resetdata + source ~/.profile + cd ~/hsadmin/hsarback && mvn test -Dtest=InitDataTest && mvn test -Dtest=DomainTest + +run: + source ~/.profile + cd ~/tomcatmq && ./bin/catalina.sh run + +psql: + WHOAMI=`whoami` && psql -U $${WHOAMI//\-/_}