1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 17:08:07 +00:00
trezor-wallet/scripts/docker-build.sh

19 lines
715 B
Bash
Raw Normal View History

2018-10-02 13:43:03 +00:00
#!/bin/bash
cd "$(dirname "$0")"
2018-10-24 15:18:28 +00:00
2018-10-24 21:01:23 +00:00
if [[ "$1" == "dev" || "$1" == "beta" || "$1" == "stable" ]]
2018-10-24 15:18:28 +00:00
then
mkdir -p ../build
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
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
2018-10-24 21:01:23 +00:00
echo "DONE!"
2018-10-24 21:35:48 +00:00
echo "Build directory: build/"$1
2018-10-24 15:18:28 +00:00
else
2018-10-24 21:01:23 +00:00
echo "invalid parameters... valid parameters are (dev, beta, stable)"
2018-10-24 15:18:28 +00:00
fi