mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
fix(common.sh): Fallback to loading version.txt from current directory.
This makes version handling continue to work normally with au-generator.zip
This commit is contained in:
parent
12149d8421
commit
12935743b6
@ -19,6 +19,7 @@ import tempfile
|
||||
# GLOBALS
|
||||
STATIC_FILES = ['/usr/bin/old_bins/cgpt',
|
||||
'/usr/bin/cros_generate_update_payload',
|
||||
'~/trunk/.repo/manifests/version.txt',
|
||||
'~/trunk/src/scripts/chromeos-common.sh',
|
||||
'~/trunk/src/scripts/common.sh',
|
||||
]
|
||||
|
@ -305,7 +305,10 @@ BUILD_LIBRARY_DIR="${SCRIPTS_DIR}/build_library"
|
||||
|
||||
# Source COREOS_* from manifest for version information.
|
||||
COREOS_VERSION_FILE="${GCLIENT_ROOT}/.repo/manifests/version.txt"
|
||||
source "$COREOS_VERSION_FILE" || die "Cannot source $COREOS_VERSION_FILE"
|
||||
if [[ ! -f "${COREOS_VERSION_FILE}" ]]; then
|
||||
COREOS_VERSION_FILE="${SCRIPT_LOCATION}/version.txt"
|
||||
fi
|
||||
source "$COREOS_VERSION_FILE" || die "Cannot source version.txt"
|
||||
|
||||
# Official builds must set COREOS_OFFICIAL=1 to use an official version.
|
||||
if [ ${COREOS_OFFICIAL:-0} -ne 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user