git: 836f00ebb96a - main - release: Don't publish CW if !WITH_CLOUDWARE

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Fri, 21 Jun 2024 00:41:18 UTC
The branch main has been updated by cperciva:

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

commit 836f00ebb96ac343e0f8a68ea264d2d330198488
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-06-21 00:38:46 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-06-21 00:41:14 +0000

    release: Don't publish CW if !WITH_CLOUDWARE
    
    If WITH_CLOUDWARE is not set, we didn't build BASIC-CLOUDWARE; don't try
    to install it into the /VM-IMAGES/ directory as part of ftp-stage.
    
    Fixes:  4771c2e9d1c7 "release: Publish non-uploaded cloudware bits"
    MFC after:      6 days
---
 release/Makefile.mirrors | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index fd233e7abdb6..1888f86d3002 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -209,10 +209,11 @@ vm-images-stage:
 		${OSRELEASE}-${FS}.${VMFORMAT}.xz
 .  endfor
 . endfor
-. for CW in ${CLOUDWARE}
-.  if ${CW} == BASIC-CLOUDINIT
-.   for VMFORMAT in ${${CW}_FORMAT}
-.    for FS in ${${CW}_FSLIST}
+. if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE)
+.  for CW in ${CLOUDWARE}
+.   if ${CW} == BASIC-CLOUDINIT
+.    for VMFORMAT in ${${CW}_FORMAT}
+.     for FS in ${${CW}_FSLIST}
 	cd ${RELEASEDIR}/vmimages && \
 		mv ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \
 		${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz
@@ -221,10 +222,11 @@ vm-images-stage:
 	cd ${VM_DIR}/Latest && \
 		ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \
 		${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+.     endfor
 .    endfor
-.   endfor
-.  endif
-. endfor
+.   endif
+.  endfor
+. endif
 	cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.*
 . for CHECKSUM in ${CHECKSUM_FILES}
 	cd ${RELEASEDIR}/vmimages && \
@@ -248,16 +250,18 @@ vm-images-stage:
 		${VM_DIR}/Latest/${OSRELEASE}-${FS}.${VMFORMAT}.xz
 .  endfor
 . endfor
-. for CW in ${CLOUDWARE}
-.  if ${CW} == BASIC-CLOUDINIT
-.   for VMFORMAT in ${${CW}_FORMAT}
-.    for FS in ${${CW}_FSLIST}
+. if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE)
+.  for CW in ${CLOUDWARE}
+.   if ${CW} == BASIC-CLOUDINIT
+.    for VMFORMAT in ${${CW}_FORMAT}
+.     for FS in ${${CW}_FSLIST}
 	cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \
 		${VM_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+.     endfor
 .    endfor
-.   endfor
-.  endif
-. endfor
+.   endif
+.  endfor
+. endif
 . for CHECKSUM in ${CHECKSUM_FILES}
 	cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \
 		${VM_DIR}/Latest/CHECKSUM.${CHECKSUM}