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 <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2025-02-25 15:06:20 +01:00
parent e61eaf172c
commit 724c9492ec
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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