-
Notifications
You must be signed in to change notification settings - Fork 45
/
demo.sh
executable file
·38 lines (31 loc) · 968 Bytes
/
demo.sh
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
#!/bin/bash
function clean() {
echo "Stopping Go Demo Containers"
docker-compose -f docker-compose.demo.yml stop
echo "Removing Go Demo Containers"
docker-compose -f docker-compose.demo.yml rm
}
function rebuild() {
echo "Re-Building Go Demo Environment"
docker-compose -f docker-compose.demo.yml build --no-cache
}
if [[ "$1" == "reset" ]]
then
clean
rebuild
elif [[ "$1" == "update" ]] ; then
clean
echo "Updating Go Test Bench"
git stash
git pull origin
rebuild
elif [[ "$1" == "gin" ]]; then
echo "Starting Go Demo Container for Gin framework"
docker-compose -f docker-compose.demo.yml up gin
elif [[ "$1" == "julienschmidt" ]]; then
echo "Starting Go Demo Container for Julienschmidt/httprouter framework"
docker-compose -f docker-compose.demo.yml up julienschmidt
else
echo "Starting Go Demo Container for standard library"
docker-compose -f docker-compose.demo.yml up std
fi