forked from bitwarden/server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·79 lines (61 loc) · 2.18 KB
/
build.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
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
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo ""
if [ $# -gt 1 -a "$1" == "push" ]
then
TAG=$2
echo "Pushing Bitwarden ($TAG)"
echo "========================"
docker push bitwarden/api:$TAG
docker push bitwarden/identity:$TAG
docker push bitwarden/server:$TAG
docker push bitwarden/attachments:$TAG
docker push bitwarden/icons:$TAG
docker push bitwarden/notifications:$TAG
docker push bitwarden/events:$TAG
docker push bitwarden/admin:$TAG
docker push bitwarden/nginx:$TAG
docker push bitwarden/mssql:$TAG
docker push bitwarden/setup:$TAG
elif [ $# -gt 1 -a "$1" == "tag" ]
then
TAG=$2
echo "Tagging Bitwarden as '$TAG'"
docker tag bitwarden/api bitwarden/api:$TAG
docker tag bitwarden/identity bitwarden/identity:$TAG
docker tag bitwarden/server bitwarden/server:$TAG
docker tag bitwarden/attachments bitwarden/attachments:$TAG
docker tag bitwarden/icons bitwarden/icons:$TAG
docker tag bitwarden/notifications bitwarden/notifications:$TAG
docker tag bitwarden/events bitwarden/events:$TAG
docker tag bitwarden/admin bitwarden/admin:$TAG
docker tag bitwarden/nginx bitwarden/nginx:$TAG
docker tag bitwarden/mssql bitwarden/mssql:$TAG
docker tag bitwarden/setup bitwarden/setup:$TAG
else
echo "Building Bitwarden"
echo "=================="
chmod u+x "$DIR/src/Api/build.sh"
"$DIR/src/Api/build.sh"
chmod u+x "$DIR/src/Identity/build.sh"
"$DIR/src/Identity/build.sh"
chmod u+x "$DIR/util/Server/build.sh"
"$DIR/util/Server/build.sh"
chmod u+x "$DIR/util/Nginx/build.sh"
"$DIR/util/Nginx/build.sh"
chmod u+x "$DIR/util/Attachments/build.sh"
"$DIR/util/Attachments/build.sh"
chmod u+x "$DIR/src/Icons/build.sh"
"$DIR/src/Icons/build.sh"
chmod u+x "$DIR/src/Notifications/build.sh"
"$DIR/src/Notifications/build.sh"
chmod u+x "$DIR/src/Events/build.sh"
"$DIR/src/Events/build.sh"
chmod u+x "$DIR/src/Admin/build.sh"
"$DIR/src/Admin/build.sh"
chmod u+x "$DIR/util/MsSql/build.sh"
"$DIR/util/MsSql/build.sh"
chmod u+x "$DIR/util/Setup/build.sh"
"$DIR/util/Setup/build.sh"
fi