2017-08-07 17:24:16 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2017-08-19 21:27:57 +02:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2017-08-07 17:24:16 +02:00
|
|
|
|
2017-08-19 21:27:57 +02:00
|
|
|
echo ""
|
2017-08-07 17:24:16 +02:00
|
|
|
|
2017-10-04 22:16:22 +02:00
|
|
|
if [ $# -gt 1 -a "$1" == "push" ]
|
2017-10-02 21:58:42 +02:00
|
|
|
then
|
2017-10-04 22:16:22 +02:00
|
|
|
TAG=$2
|
|
|
|
|
2018-02-27 20:16:19 +01:00
|
|
|
echo "Pushing Bitwarden ($TAG)"
|
2017-10-04 22:16:22 +02:00
|
|
|
echo "========================"
|
2020-07-17 14:28:31 +02:00
|
|
|
|
2017-10-04 22:16:22 +02:00
|
|
|
docker push bitwarden/api:$TAG
|
|
|
|
docker push bitwarden/identity:$TAG
|
|
|
|
docker push bitwarden/server:$TAG
|
|
|
|
docker push bitwarden/attachments:$TAG
|
2017-10-24 14:26:51 +02:00
|
|
|
docker push bitwarden/icons:$TAG
|
2018-08-18 00:14:25 +02:00
|
|
|
docker push bitwarden/notifications:$TAG
|
2019-07-09 20:49:34 +02:00
|
|
|
docker push bitwarden/events:$TAG
|
2018-03-24 02:11:17 +01:00
|
|
|
docker push bitwarden/admin:$TAG
|
2017-10-04 22:16:22 +02:00
|
|
|
docker push bitwarden/nginx:$TAG
|
2020-09-04 19:56:08 +02:00
|
|
|
docker push bitwarden/sso:$TAG
|
|
|
|
docker push bitwarden/portal:$TAG
|
2017-10-04 22:16:22 +02:00
|
|
|
docker push bitwarden/mssql:$TAG
|
|
|
|
docker push bitwarden/setup:$TAG
|
2017-10-02 22:20:04 +02:00
|
|
|
elif [ $# -gt 1 -a "$1" == "tag" ]
|
|
|
|
then
|
|
|
|
TAG=$2
|
2020-07-17 14:28:31 +02:00
|
|
|
|
2018-02-27 20:16:19 +01:00
|
|
|
echo "Tagging Bitwarden as '$TAG'"
|
2020-07-17 14:28:31 +02:00
|
|
|
|
2017-10-02 22:20:04 +02:00
|
|
|
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
|
2017-10-24 14:26:51 +02:00
|
|
|
docker tag bitwarden/icons bitwarden/icons:$TAG
|
2018-08-18 00:14:25 +02:00
|
|
|
docker tag bitwarden/notifications bitwarden/notifications:$TAG
|
2019-07-09 20:49:34 +02:00
|
|
|
docker tag bitwarden/events bitwarden/events:$TAG
|
2018-03-24 02:11:17 +01:00
|
|
|
docker tag bitwarden/admin bitwarden/admin:$TAG
|
2017-10-02 22:20:04 +02:00
|
|
|
docker tag bitwarden/nginx bitwarden/nginx:$TAG
|
2020-09-04 19:56:08 +02:00
|
|
|
docker tag bitwarden/sso bitwarden/sso:$TAG
|
|
|
|
docker tag bitwarden/portal bitwarden/portal:$TAG
|
2017-10-02 22:20:04 +02:00
|
|
|
docker tag bitwarden/mssql bitwarden/mssql:$TAG
|
|
|
|
docker tag bitwarden/setup bitwarden/setup:$TAG
|
2017-10-02 21:58:42 +02:00
|
|
|
else
|
2018-02-27 20:16:19 +01:00
|
|
|
echo "Building Bitwarden"
|
2017-10-02 21:58:42 +02:00
|
|
|
echo "=================="
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Api/build.sh"
|
|
|
|
"$DIR/src/Api/build.sh"
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Identity/build.sh"
|
|
|
|
"$DIR/src/Identity/build.sh"
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/util/Server/build.sh"
|
|
|
|
"$DIR/util/Server/build.sh"
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/util/Nginx/build.sh"
|
|
|
|
"$DIR/util/Nginx/build.sh"
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/util/Attachments/build.sh"
|
|
|
|
"$DIR/util/Attachments/build.sh"
|
2017-08-19 21:27:57 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Icons/build.sh"
|
|
|
|
"$DIR/src/Icons/build.sh"
|
2017-10-24 14:26:51 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Notifications/build.sh"
|
|
|
|
"$DIR/src/Notifications/build.sh"
|
2018-08-18 00:14:25 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Events/build.sh"
|
|
|
|
"$DIR/src/Events/build.sh"
|
2019-07-09 20:49:34 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/src/Admin/build.sh"
|
|
|
|
"$DIR/src/Admin/build.sh"
|
2018-03-24 02:11:17 +01:00
|
|
|
|
2020-09-04 19:56:08 +02:00
|
|
|
chmod u+x "$DIR/bitwarden_license/src/Sso/build.sh"
|
|
|
|
"$DIR/bitwarden_license/src/Sso/build.sh"
|
|
|
|
|
|
|
|
chmod u+x "$DIR/bitwarden_license/src/Portal/build.sh"
|
|
|
|
"$DIR/bitwarden_license/src/Portal/build.sh"
|
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/util/MsSql/build.sh"
|
|
|
|
"$DIR/util/MsSql/build.sh"
|
2017-10-02 21:58:42 +02:00
|
|
|
|
2020-07-17 14:28:31 +02:00
|
|
|
chmod u+x "$DIR/util/Setup/build.sh"
|
|
|
|
"$DIR/util/Setup/build.sh"
|
2017-10-02 21:58:42 +02:00
|
|
|
fi
|