mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
Docker: support local build and build from other gh repos
Similar to recent trezor-mcu changes
This commit is contained in:
parent
4b58162b54
commit
2865c9853c
@ -3,11 +3,18 @@ set -e
|
||||
|
||||
IMAGE=trezor-core-build
|
||||
TAG=${1:-master}
|
||||
REPOSITORY=${2:-trezor}
|
||||
|
||||
if [ "$REPOSITORY" = "local" ]; then
|
||||
REPOSITORY=file:///local/
|
||||
else
|
||||
REPOSITORY=https://github.com/$REPOSITORY/trezor-core.git
|
||||
fi
|
||||
|
||||
docker build -t $IMAGE .
|
||||
|
||||
docker run -t -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
||||
git clone https://github.com/trezor/trezor-core && \
|
||||
docker run -t -v $(pwd):/local -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
||||
git clone $REPOSITORY trezor-core && \
|
||||
cd trezor-core && \
|
||||
ln -s /build build &&
|
||||
git checkout $TAG && \
|
||||
|
Loading…
Reference in New Issue
Block a user