From ba9dd61aeb0f7b3995f77241fa93dc4e5d4475d5 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 16 Aug 2013 21:47:31 -0400 Subject: [PATCH] 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. --- common.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.sh b/common.sh index 4c4c114ccc..1f9e1c64d5 100644 --- a/common.sh +++ b/common.sh @@ -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. # 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)" fi