-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·32 lines (28 loc) · 803 Bytes
/
run.sh
File metadata and controls
executable file
·32 lines (28 loc) · 803 Bytes
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
#!/bin/bash
export MIN_JS=false
SPRING_BOOT_ARGS=()
GRADLE_ARGS=()
ADD_DB=false
PROFILE=dev
while [ $# -ne 0 ];
do
if [ "$1" = "--create-db" ];
then
SPRING_BOOT_ARGS+=("--hbm.dev.auto=create")
ADD_DB=true
echo "Dropping then Creating/Recreating database schema"
elif [ "$1" = "--no-webapp-build" ];
then
GRADLE_ARGS+=("-xbuildWebapp")
elif [ "$1" = "--prod" ];
then
PROFILE="prod"
fi
shift
done
if [ "$ADD_DB" = false ]; then
echo "Updating database schema without dropping"
fi
FORMATTED_SPRING_BOOT_ARGS="$(printf "%s " "${SPRING_BOOT_ARGS[@]}" )"
FORMATTED_GRADLE_ARGS="$(printf "%s " "${GRADLE_ARGS[@]}" )"
./gradlew clean bootRun --args="--spring.profiles.active=${PROFILE} $FORMATTED_SPRING_BOOT_ARGS" $FORMATTED_GRADLE_ARGS