git: d1f275606d9f - stable/14 - GCE: Add TARGET and FS to image family

From: Xin LI <delphij_at_FreeBSD.org>
Date: Mon, 29 Dec 2025 03:28:04 UTC
The branch stable/14 has been updated by delphij:

URL: https://cgit.FreeBSD.org/src/commit/?id=d1f275606d9fa2560606c4b6e515bc35d82699fc

commit d1f275606d9fa2560606c4b6e515bc35d82699fc
Author:     Andrew Jorgensen <ajorgens@google.com>
AuthorDate: 2025-11-14 18:06:16 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2025-12-29 03:22:18 +0000

    GCE: Add TARGET and FS to image family
    
    GCE image family is meant to be unique per set of image characteristics
    so that a user can create instances using the image family instead of the
    image name to reliably get a similar image with updated software, but no
    other changes.
    
    Without this change, the instances create API would select the most recent
    non-deprecated image matching the name, regardless of architecture or
    filesystem.
    
    (cherry picked from commit fc83e6c5e1f20087314dc52b63e485db87a98b86)
---
 release/Makefile.gce | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/release/Makefile.gce b/release/Makefile.gce
index 51dc5e3436e2..f67cc5da8d82 100644
--- a/release/Makefile.gce
+++ b/release/Makefile.gce
@@ -18,7 +18,7 @@ GCE_BUCKET?=
 GCE_LICENSE?=
 
 .if !defined(GCE_FAMILY) || empty(GCE_FAMILY)
-GCE_FAMILY=		${TYPE:tl}-${REVISION:S,.,-,}
+GCE_FAMILY=		${TYPE:tl}-${REVISION:S,.,-,}-${TARGET}
 .endif
 
 .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE"
@@ -76,7 +76,7 @@ gce-do-upload-${_FS}:
 	/usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \
 		gs://${GCE_BUCKET}/
 	/usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \
-		--family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \
+		--family=${GCE_FAMILY}-${_FS}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \
 		--guest-os-features=GVNIC,UEFI_COMPATIBLE \
 		--source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz
 	touch ${.OBJDIR}/${.TARGET}