From 08e7da50ef47803f83f973d528c49fc4c15e97f9 Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 2 Feb 2021 20:30:25 +0800 Subject: [PATCH] Update CI Script --- INSTALL/all_in_one.sh | 30 +++++++++++++++++------------- INSTALL/docker_ci_build.sh | 4 ++-- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/INSTALL/all_in_one.sh b/INSTALL/all_in_one.sh index 6b8c8626..d87f713c 100644 --- a/INSTALL/all_in_one.sh +++ b/INSTALL/all_in_one.sh @@ -1,29 +1,32 @@ #!/bin/sh VTOY_PATH=$PWD/.. +LOGCON=$2 -LOG=$VTOY_PATH/DOC/build.log - -[ -f $LOG ] && rm -f $LOG +logci() { + if [ -n "$LOGCON" ]; then + echo $* > $LOGCON + fi +} cd $VTOY_PATH/DOC -echo "prepare_env ..." -sh prepare_env.sh >> $LOG 2>&1 +logci "prepare_env ..." +sh prepare_env.sh export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin -echo "build grub2 ..." +logci "build grub2 ..." cd $VTOY_PATH/GRUB2 -sh buildgrub.sh >> $LOG 2>&1 || exit 1 +sh buildgrub.sh || exit 1 -echo "build ipxe ..." +logci "build ipxe ..." cd $VTOY_PATH/IPXE -sh buildipxe.sh >> $LOG 2>&1 || exit 1 +sh buildipxe.sh || exit 1 -echo "build edk2 ..." +logci "build edk2 ..." cd $VTOY_PATH/EDK2 -sh buildedk.sh >> $LOG 2>&1 || exit 1 +sh buildedk.sh || exit 1 @@ -75,7 +78,8 @@ if [ "$1" = "CI" ]; then sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/" -i ./grub/grub.cfg fi -echo "packing ventoy-$Ver ..." -sh ventoy_pack.sh $1 >> $LOG 2>&1 || exit 1 +logci "packing ventoy-$Ver ..." +sh ventoy_pack.sh $1 || exit 1 +logci "==== finish ====" echo -e '\n============== SUCCESS ==================\n' diff --git a/INSTALL/docker_ci_build.sh b/INSTALL/docker_ci_build.sh index 51eda613..45c68873 100644 --- a/INSTALL/docker_ci_build.sh +++ b/INSTALL/docker_ci_build.sh @@ -10,5 +10,5 @@ wget -q -O $VTOY_PATH/EDK2/edk2-edk2-stable201911.zip https://codeload.github.co wget -q -P /opt/ https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz wget -q -P /opt/ https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.tar.bz2 - -sh all_in_one.sh CI +LOGCON=$(readlink /proc/self/fd/1) +sh all_in_one.sh CI $LOGCON > $VTOY_PATH/DOC/build.log 2>&1