mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
load_environment_var: Pickup COREOS_BUILD_ID
Change the setting of COREOS_BUILD_ID so that its value, in order of preference, is set to A value set in the environment. A value provided in manifest's version.txt. A fall back value of the current time-date. Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
aa259bf685
commit
5a76e4e5e9
@ -289,9 +289,14 @@ REPO_MANIFESTS_DIR="${REPO_ROOT}/.repo/manifests"
|
|||||||
|
|
||||||
# Source COREOS_VERSION_ID from manifest.
|
# Source COREOS_VERSION_ID from manifest.
|
||||||
if [[ -f "${REPO_MANIFESTS_DIR}/version.txt" ]]; then
|
if [[ -f "${REPO_MANIFESTS_DIR}/version.txt" ]]; then
|
||||||
load_environment_var "${REPO_MANIFESTS_DIR}/version.txt" \
|
|
||||||
COREOS_VERSION_ID COREOS_SDK_VERSION
|
|
||||||
# The build id may be provided externally by the build system.
|
# The build id may be provided externally by the build system.
|
||||||
|
if [[ -n ${COREOS_BUILD_ID} ]]; then
|
||||||
|
load_environment_var "${REPO_MANIFESTS_DIR}/version.txt" \
|
||||||
|
COREOS_VERSION_ID COREOS_SDK_VERSION
|
||||||
|
else
|
||||||
|
load_environment_var "${REPO_MANIFESTS_DIR}/version.txt" \
|
||||||
|
COREOS_VERSION_ID COREOS_BUILD_ID COREOS_SDK_VERSION
|
||||||
|
fi
|
||||||
: ${COREOS_BUILD_ID:=$(date +%Y-%m-%d-%H%M)}
|
: ${COREOS_BUILD_ID:=$(date +%Y-%m-%d-%H%M)}
|
||||||
elif [[ -f "${SCRIPT_LOCATION}/version.txt" ]]; then
|
elif [[ -f "${SCRIPT_LOCATION}/version.txt" ]]; then
|
||||||
# This only happens in update.zip where we must use the current build id.
|
# This only happens in update.zip where we must use the current build id.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user