1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-07 14:00:57 +00:00

build(build-docker): perform a reproducible shallow clone of the repository in build-docker.sh

This commit is contained in:
matejcik 2024-12-04 10:19:17 +01:00 committed by Martin Milata
parent 2635e4c7fd
commit 7d4cd8ffb7

View File

@ -72,7 +72,7 @@ INIT=1
MODELS=(R T T3T1) MODELS=(R T T3T1)
CORE_TARGETS=(boardloader bootloader firmware) CORE_TARGETS=(boardloader bootloader firmware)
REPOSITORY="/local" REPOSITORY="file:///local"
while true; do while true; do
case "$1" in case "$1" in
@ -204,7 +204,7 @@ if [ $INIT -eq 1 ]; then
mkdir -p /reproducible-build mkdir -p /reproducible-build
cd /reproducible-build cd /reproducible-build
git clone "$REPOSITORY" trezor-firmware git clone --branch="$TAG" --depth=1 "$REPOSITORY" trezor-firmware
cd trezor-firmware cd trezor-firmware
EOF EOF
@ -224,8 +224,6 @@ fi # init
# append common part to script # append common part to script
cat <<EOF >> "$SCRIPT_NAME" cat <<EOF >> "$SCRIPT_NAME"
$GIT_CLEAN_REPO $GIT_CLEAN_REPO
git fetch origin "$COMMIT_HASH"
git checkout "$COMMIT_HASH"
git submodule update --init --recursive git submodule update --init --recursive
poetry install poetry install
cd core/embed/rust cd core/embed/rust