-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdevi
More file actions
executable file
·131 lines (106 loc) · 3.74 KB
/
Copy pathdevi
File metadata and controls
executable file
·131 lines (106 loc) · 3.74 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/bash
############################################################
# The Imixs Developer Script
# start, build, deploy
#
############################################################
# Helper function to remove the '-' char from a param
strip_dash() {
echo "$1" | sed 's/^-//'
}
echo " _ _ _ _ "
echo " __| | _____ _(_) | |__ ___| |_ __"
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ | \'_ \\"
echo "| (_| | __/\ V /| | | | | | __/ | |_) |"
echo " \__,_|\___| \_/ |_| |_| |_|\___|_| .__/ "
echo " |_| "
echo " Imixs Developer Script..."
echo "_________________________________________"
# now verify params...
if [[ "$(strip_dash $1)" == "start-all" ]]; then
echo " starting frontend and server..."
cd open-bpmn.glsp-client/
yarn start --root-dir=./open-bpmn.glsp-client/workspace
cd ..
fi
if [[ "$(strip_dash $1)" == "start-frontend" ]]; then
echo " starting frontend only..."
cd open-bpmn.glsp-client/
yarn start:external --root-dir=./open-bpmn.glsp-client/workspace
cd ..
fi
if [[ "$(strip_dash $1)" == "build-all" ]]; then
echo " starting maven build..."
mvn clean install -DskipTests
echo " install frontend..."
cd open-bpmn.glsp-client/
yarn install --ignore-engines
cd ..
fi
if [[ "$(strip_dash $1)" == "build-server" ]]; then
echo " starting maven build..."
mvn clean install
fi
if [[ "$(strip_dash $1)" == "build-frontend" ]]; then
echo " install frontend..."
cd open-bpmn.glsp-client/
yarn install --ignore-engines
cd ..
fi
if [[ "$(strip_dash $1)" == "hot" ]]; then
echo " starting hot deployment mode for frontend..."
cd open-bpmn.glsp-client/
yarn watch
cd ..
fi
if [[ "$(strip_dash $1)" == "docker-build" ]]; then
echo " building docker image..."
mvn clean install -DskipTests
docker build . -t imixs/open-bpmn
fi
if [[ "$(strip_dash $1)" == "docker-run" ]]; then
echo " start docker container..."
docker run -it --rm --name="open-bpmn" -p 3000:3000 imixs/open-bpmn
fi
if [[ "$(strip_dash $1)" == "docker-push" ]]; then
echo " push docker image..."
docker push imixs/open-bpmn
fi
if [[ "$(strip_dash $1)" == "docker-multi-arch" ]]; then
echo " building JAR file..."
mvn clean install -DskipTests
echo "build and push docker image for Multi-Arch..."
docker buildx use multiarch
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t imixs/open-bpmn:latest \
--push \
.
docker buildx use default
echo " switched back to default builder"
fi
if [[ "$(strip_dash $1)" == "clean" ]]; then
echo " cleanup build..."
# clean up gitignore files
git clean -xdf
#mvn clean
rm open-bpmn.glsp-client/yarn.lock
fi
# Überprüfen, ob keine Parameter übergeben wurden - standard build
if [[ $# -eq 0 ]]; then
echo " Run with ./dev.sh -XXX"
echo " "
echo " -build-all : build the backend and frontend component"
echo " -build-server : run a maven java build "
echo " -build-frontend : install the frontend components "
echo " -start-all : start the frontend & server"
echo " -start-frontend : start the frontend only without a server"
echo " -hot : start hot deployment mode for frontend components "
echo " -clean : clean up build "
echo " -docker-build : build docker image only"
echo " -docker-run : run the docker container "
echo " -docker-push : push the docker image "
echo " -docker-multi-arch: build an push docker image for Multi-Arch "
echo "_______________________________________________________________________"
echo " "
fi