mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
fix(common.sh): Do not add dev build id when outside a repo checkout.
When running from a au zip or other strange situation assume the version in version.txt should be used as-is. This avoid the need to set COREOS_OFFICIAL=1 in these situations which can be lead to surprises.
This commit is contained in:
parent
7b8036c947
commit
ba9dd61aeb
@ -308,7 +308,9 @@ source "$COREOS_VERSION_FILE" || die "Cannot source version.txt"
|
|||||||
|
|
||||||
# Official builds must set COREOS_OFFICIAL=1 to use an official version.
|
# Official builds must set COREOS_OFFICIAL=1 to use an official version.
|
||||||
# Unofficial builds always appended the date/time as a build identifier.
|
# Unofficial builds always appended the date/time as a build identifier.
|
||||||
if [ ${COREOS_OFFICIAL:-0} -ne 1 ]; then
|
# Also do not alter the version if using an alternate version.txt path.
|
||||||
|
if [[ ${COREOS_OFFICIAL:-0} -ne 1 &&
|
||||||
|
"${COREOS_VERSION_FILE}" =~ /\.repo/manifests/version.txt ]]; then
|
||||||
COREOS_PATCH="${COREOS_PATCH}+$(date +%Y-%m-%d-%H%M)"
|
COREOS_PATCH="${COREOS_PATCH}+$(date +%Y-%m-%d-%H%M)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user