2018-10-02 13:43:03 +00:00
|
|
|
#!/bin/bash
|
2018-10-02 13:48:51 +00:00
|
|
|
|
|
|
|
cd "$(dirname "$0")"
|
2018-10-24 15:18:28 +00:00
|
|
|
|
|
|
|
if [[ "$1" == "dev" || "$1" == 'beta' || "$1" == 'prod' ]]
|
|
|
|
then
|
2018-10-24 16:47:04 +00:00
|
|
|
mkdir -p ../build
|
2018-10-24 15:31:49 +00:00
|
|
|
rm -rf ../build/$1
|
|
|
|
docker ps -q --filter "name=trezor-wallet" | grep -q . && docker stop trezor-wallet && docker rm -fv trezor-wallet
|
2018-10-24 15:18:28 +00:00
|
|
|
docker build -t trezor-wallet ../ --build-arg BUILD_TYPE=$1
|
|
|
|
docker run -p 8080:8080 -d --name trezor-wallet trezor-wallet:latest
|
2018-10-24 16:38:39 +00:00
|
|
|
docker cp trezor-wallet:/trezor-wallet-app/build/$1 ../build/$1
|
2018-10-24 15:18:28 +00:00
|
|
|
docker stop trezor-wallet
|
|
|
|
docker rm trezor-wallet
|
|
|
|
else
|
|
|
|
echo "invalid parameters... valid parameters are (beta, dev, prod)"
|
|
|
|
fi
|