2021-09-23 05:07:26 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|
|
|
|
2022-07-30 08:26:16 -04:00
|
|
|
mvn quarkus:add-extension -Dextensions=container-image-docker
|
2021-09-23 05:07:26 -04:00
|
|
|
|
|
|
|
if [ "$1" = "native" ]; then
|
2022-07-30 08:26:16 -04:00
|
|
|
mvn clean package -Pnative -Dquarkus.native.container-build=true -f $SCRIPTPATH/pom.xml &&
|
2021-09-23 05:07:26 -04:00
|
|
|
docker build -f $SCRIPTPATH/src/main/docker/Dockerfile.native -t quarkus-project:0.1-SNAPSHOT $SCRIPTPATH/.
|
2022-07-30 08:26:16 -04:00
|
|
|
elif [ "$1" = "local-native" ]; then
|
|
|
|
mvn clean package -DskipTests -Pnative -f $SCRIPTPATH/pom.xml
|
2021-09-23 05:07:26 -04:00
|
|
|
else
|
2022-07-30 08:26:16 -04:00
|
|
|
mvn clean package -Dquarkus.container-build=true -f $SCRIPTPATH/pom.xml &&
|
2021-09-23 05:07:26 -04:00
|
|
|
docker build -f $SCRIPTPATH/src/main/docker/Dockerfile.jvm -t quarkus-project:0.1-SNAPSHOT $SCRIPTPATH/.
|
|
|
|
fi
|