build_sysext: override FLATCAR_VERSION only for non-official builds

Without this, official builds are failing:
```
This is a dev rebuild of an official release tag: No BUILD ID set in '/mnt/host/source/.repo/manifests/version.txt'.  Will use base squasfs BUILD ID for version check.
Repo root FLATCAR_VERSION is '4081.0.0', squashfs build ID is '2024-09-03-2245'
Setting FLATCAR_VERSION to '4081.0.0+2024-09-03-2245'
Base squashfs version: 4081.0.0
SDK board packages version: 4081.0.0+2024-09-03-2245
Version mismatch between board flatcar release and SDK container flatcar release.
```

The "base squashfs version" is the actual version for official release builds.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2024-09-04 14:08:38 +02:00
parent 69d6efe414
commit 5a8ecab5ed
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -188,7 +188,7 @@ REPO_BUILD_ID=$(source "${REPO_MANIFESTS_DIR}/version.txt"; echo "$FLATCAR_BUILD
REPO_FLATCAR_VERSION=$(source "${REPO_MANIFESTS_DIR}/version.txt"; echo "$FLATCAR_VERSION")
VERSION_BOARD=$(source "${BUILD_DIR}/fs-root/usr/lib/os-release" && echo "$VERSION")
if [[ -z $REPO_BUILD_ID ]] ; then
if [[ -z $REPO_BUILD_ID ]] && [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then
BASE_SQUASHFS_BUILD_ID=$(source "${BUILD_DIR}/fs-root/usr/lib/os-release" && echo -n "$BUILD_ID")
info "This is a dev rebuild of an official release tag: No BUILD ID set in '${REPO_MANIFESTS_DIR}/version.txt'. Will use base squashfs BUILD ID for version check."
info "Repo root FLATCAR_VERSION is '$REPO_FLATCAR_VERSION', squashfs build ID is '$BASE_SQUASHFS_BUILD_ID'"