From 724c9492ecab84f8c12852ea16e160e9ca70074c Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 25 Feb 2025 15:06:20 +0100 Subject: [PATCH] build: Start a build release environment from scratch The release build should ensure it starts from a fresh environment to avoid potential mismatches with old code. Signed-off-by: Arturo Buzarra --- sdk/build-github.sh | 4 ++++ sdk/build.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sdk/build-github.sh b/sdk/build-github.sh index be51ffa75..4e42df27c 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -178,6 +178,10 @@ fi printf "\n[INFO] Build Yocto \"%s\" for \"%s\" (cpus=%s)\n\n" "${DY_REVISION}" "${DY_PLATFORMS}" "${CPUS}" # Install/Update Digi's Yocto SDK +if [ "${DY_BUILD_RELEASE}" = "true" ]; then + # Start a build release environment from scratch + rm -rf "${YOCTO_INST_DIR}" +fi mkdir -p "${YOCTO_INST_DIR}" if pushd "${YOCTO_INST_DIR}"; then # Use git ls-remote to check the revision type diff --git a/sdk/build.sh b/sdk/build.sh index badf6802a..57626cdd4 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -206,6 +206,10 @@ fi printf "\n[INFO] Build Yocto \"%s\" for \"%s\" (cpus=%s)\n\n" "${DY_REVISION}" "${DY_PLATFORMS}" "${CPUS}" # Install/Update Digi's Yocto SDK +if [ "${DY_BUILD_RELEASE}" = "true" ]; then + # Start a build release environment from scratch + rm -rf "${YOCTO_INST_DIR}" +fi mkdir -p "${YOCTO_INST_DIR}" if pushd "${YOCTO_INST_DIR}"; then # Use git ls-remote to check the revision type