-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo
More file actions
executable file
·33 lines (30 loc) · 870 Bytes
/
go
File metadata and controls
executable file
·33 lines (30 loc) · 870 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
33
#!/usr/bin/env bash
set -e -o pipefail
##DOC setup: Sets up the project after first checkout
goal_setup() {
cd contracts4components.web
npm install
cd -
cd contracts4components.server
./gradlew clean install
cd -
}
##DOC run: Starts the server and runs the test suite once to populate the database
goal_run() {
cd contracts4components.server
./gradlew build
docker build -t mkainer/contracts4components.server .
docker run -d -p 8097:8097 --name=contracts4components mkainer/contracts4components.server
cd -
cd contracts4components.web
npm run test:use-case:consumer
npm run test:use-case:provider
}
TARGET=${1:-}
if type -t "goal_$TARGET" &>/dev/null; then
"goal_$TARGET" "${@:2}"
else
echo "usage: $0 <goal>"
grep -e "^##DOC" < "$(basename "$0")" | sed "s/^##DOC \(.*\)/ \1/" | sort
exit 1
fi