[SC64][BUILD] Moved time printing from docker_build.sh to build.sh

This commit is contained in:
Mateusz Faderewski 2025-03-08 22:12:38 +01:00
parent f546e5d17d
commit 3fbb6f3823
2 changed files with 12 additions and 8 deletions

View File

@ -163,6 +163,14 @@ if test $# -eq 0; then
exit 1
fi
print_time () {
echo "Build took $SECONDS seconds"
}
trap "echo \"Build failed\"; print_time" ERR
SECONDS=0
TRIGGER_BOOTLOADER=false
TRIGGER_CONTROLLER=false
TRIGGER_CIC=false
@ -213,3 +221,5 @@ if [ "$TRIGGER_CIC" = true ]; then build_cic; fi
if [ "$TRIGGER_FPGA" = true ]; then build_fpga; fi
if [ "$TRIGGER_UPDATE" = true ]; then build_update; fi
if [ "$TRIGGER_RELEASE" = true ]; then build_release; fi
print_time

View File

@ -14,8 +14,6 @@ if [ -t 1 ]; then
DOCKER_OPTIONS="-it"
fi
SECONDS=0
docker run \
$DOCKER_OPTIONS \
--rm \
@ -33,12 +31,8 @@ docker run \
$BUILDER_IMAGE \
./build.sh $@
BUILD_ERROR=$?
echo "Build took $SECONDS seconds"
BUILD_RESULT=$?
popd > /dev/null
if [ $BUILD_ERROR -ne 0 ]; then
exit -1
fi
exit $BUILD_RESULT