File tree 2 files changed +49
-0
lines changed
demos/spring-boot-3-upgrade-demo 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ demo-spring-song-app
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ scriptDir=$( dirname " ${BASH_SOURCE[0]} " )
4
+ projectRoot=$scriptDir /../..
5
+ webApp=$projectRoot /applications/spring-boot-upgrade
6
+ demoApp=" $scriptDir /demo-spring-song-app"
7
+ applicationJar=" ${webApp} /target/spring-boot-upgrade.jar"
8
+
9
+ function pause(){
10
+ echo " =============================================================================================="
11
+ echo " -> $* "
12
+ echo " Press Enter to continue..."
13
+ read -p " =============================================================================================="
14
+ }
15
+
16
+ function build() {
17
+ # build sbm
18
+ pushd " ${projectRoot} " || exit
19
+ mvn clean install -DskipTests
20
+ popd
21
+ }
22
+
23
+ function buildIfGitStatusNotClean() {
24
+ git update-index --really-refresh >> /dev/null
25
+ if [[ ! ` git diff-index --quiet HEAD` ]] || [[ ! -f " ${webApp} /target/spring-boot-upgrade.jar" ]]; then
26
+ echo " git status not clean, building project"
27
+ build
28
+ fi
29
+ }
30
+
31
+
32
+ # cleanup
33
+ rm -rf " $demoApp "
34
+
35
+ buildIfGitStatusNotClean
36
+
37
+ # checkout demo project
38
+ git clone https://github.com/sanagaraj-pivotal/demo-spring-song-app.git $demoApp
39
+ pushd " $demoApp " || exit
40
+ git checkout -b boot-3-upgrade-demo tags/demo
41
+ idea .
42
+ popd
43
+
44
+ pause " kill process currently running under port 8080"
45
+ lsof -i :8080 | awk ' {system("kill -9 " $2)}'
46
+
47
+ # start webapp
48
+ java -jar --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED $applicationJar $demoApp
You can’t perform that action at this time.
0 commit comments