bitwarden-estensione-browser/build.sh

34 lines
657 B
Bash
Raw Normal View History

2017-08-07 23:07:56 +02:00
#!/usr/bin/env bash
set -e
2017-08-20 04:36:09 +02:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2017-08-07 23:07:56 +02:00
2017-08-20 04:36:09 +02:00
echo ""
2017-08-07 23:07:56 +02:00
2017-10-04 22:17:00 +02:00
if [ $# -gt 1 -a "$1" == "push" ]
2017-10-02 22:39:37 +02:00
then
2017-10-04 22:17:00 +02:00
TAG=$2
echo "# Pushing Web ($TAG)"
2017-10-02 22:39:37 +02:00
echo ""
2017-10-04 22:17:00 +02:00
docker push bitwarden/web:$TAG
2017-10-02 22:39:37 +02: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 23:07:56 +02:00
2017-10-02 22:39:37 +02:00
echo ""
echo "Building app"
echo "npm version $(npm --version)"
echo "gulp version $(gulp --version)"
npm install
gulp dist:selfHosted
echo ""
echo "Building docker image"
docker --version
docker build -t bitwarden/web $DIR/.
fi