1
0
mirror of https://github.com/bitwarden/browser synced 2025-01-27 11:39:42 +01:00

34 lines
639 B
Bash
Raw Normal View History

2017-08-07 17:07:56 -04:00
#!/usr/bin/env bash
set -e
2017-08-19 22:36:09 -04:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2017-08-07 17:07:56 -04:00
2017-08-19 22:36:09 -04:00
echo ""
2017-08-07 17:07:56 -04:00
2017-10-04 16:17:00 -04:00
if [ $# -gt 1 -a "$1" == "push" ]
2017-10-02 16:39:37 -04:00
then
2017-10-04 16:17:00 -04:00
TAG=$2
echo "# Pushing Web ($TAG)"
2017-10-02 16:39:37 -04:00
echo ""
2017-10-04 16:17:00 -04:00
docker push bitwarden/web:$TAG
2017-10-02 16:39:37 -04:00
elif [ $# -gt 1 -a "$1" == "tag" ]
then
TAG=$2
echo "Tagging Web as '$TAG'"
docker tag bitwarden/web bitwarden/web:$TAG
else
echo "# Building Web"
2017-08-07 17:07:56 -04:00
2017-10-02 16:39:37 -04:00
echo ""
echo "Building app"
echo "npm version $(npm --version)"
npm install
2018-07-18 15:21:51 -04:00
npm run sub:update
npm run dist:selfhost
2017-10-02 16:39:37 -04:00
echo ""
echo "Building docker image"
docker --version
docker build -t bitwarden/web $DIR/.
fi