[neon/infrastructure/pangea-data] imager: add $DIST to noble and release builds
Carlos De Maine
null at kde.org
Sun Sep 29 11:01:25 BST 2024
Git commit d71d304461993bb7dd85176b7e3c85c1c060c395 by Carlos De Maine.
Committed on 29/09/2024 at 10:01.
Pushed by carlosdem into branch 'master'.
add $DIST to noble and release builds
stop release builds writing over each other and diferentiate iso's by $DIST
M +44 -15 imager/build.sh
https://invent.kde.org/neon/infrastructure/pangea-data/-/commit/d71d304461993bb7dd85176b7e3c85c1c060c395
diff --git a/imager/build.sh b/imager/build.sh
index d912331..8c80a07 100755
--- a/imager/build.sh
+++ b/imager/build.sh
@@ -143,10 +143,13 @@ sudo -E $(dirname "$0")/ubuntu-defaults-image \
--flavor neon \
--components main,restricted,universe,multiverse
+# build is finished
cat config/common
+# debug the result
ls -lah
+# fail is appropriate
if [ ! -e livecd.neon.iso ]; then
echo "ISO Build Failed."
ls -la
@@ -154,31 +157,57 @@ if [ ! -e livecd.neon.iso ]; then
exit 1
fi
+# mv the booty
mv livecd.neon.* ../result/
-mv source.debian.tar ../result/ || true
cd ../result/
-for f in live*; do
- new_name=$(echo $f | sed "s/livecd\.neon/${IMAGENAME}-${TYPE}-${DATETIME}/")
- mv $f $new_name
-done
+# change to include $DIST to be able to differentiate iso's e.g.-> neon-noble-release-#######.iso
+if [ $TYPE = 'release' ] || [ $DIST = 'NOBLE' ]; then
+ for f in live*; do
+ new_iso_name_timestamped=$(echo $f | sed "s/livecd\.neon/${IMAGENAME}-${DIST}-${TYPE}-${DATETIME}/")
+ mv $f $new_iso_name_timestamped
+ done
+ new_iso_name_current="neon-${IMAGENAME}-${DIST}-${TYPE}-current"
+ ln -s $new_iso_name_timestamped.iso $new_iso_name_current.iso
+ zsyncmake $new_iso_name_current.iso
+ sha256sum $new_iso_name_timestamped.iso > $new_iso_name_timestamped.sha256sum
+# write our message
+cat > .message << END
+KDE neon
-mv source.debian.tar ${IMAGENAME}-${TYPE}-${DATETIME}-source.tar || true
-ln -s ${IMAGENAME}-${TYPE}-${DATETIME}.iso ${IMAGENAME}-${TYPE}-current.iso
-zsyncmake ${IMAGENAME}-${TYPE}-current.iso
-sha256sum ${IMAGENAME}-${TYPE}-${DATETIME}.iso > ${IMAGENAME}-${TYPE}-${DATETIME}.sha256sum
+$new_iso_name_timestamped.iso Live and Installable ISO
+$new_iso_name_timestamped.iso.sig PGP Digital Signature
+$new_iso_name_timestamped.manifest ISO contents
+$new_iso_name_timestamped.sha256sum Checksum
+$new_iso_name_timestamped.torrent Web Seed torrent (you client needs to support web seeds or it may not work)
+"current" files are the same files for those wanting a URL which does not change daily.
+END
+# don't change jammy iso's apart from unpublished release iso
+else
+ for f in live*; do
+ new_iso_name_timestamped=$(echo $f | sed "s/livecd\.neon/${IMAGENAME}-${TYPE}-${DATETIME}/")
+ mv $f $new_iso_name_timestamped
+ done
+ new_iso_name_current="neon-${IMAGENAME}-${TYPE}-current"
+ ln -s $new_iso_name_timestamped.iso $new_iso_name_current.iso
+ zsyncmake $new_iso_name_current.iso
+ sha256sum $new_iso_name_timestamped.iso > $new_iso_name_timestamped.sha256sum
+# write our message
cat > .message << END
KDE neon
-${IMAGENAME}-${TYPE}-${DATETIME}.iso Live and Installable ISO
-${IMAGENAME}-${TYPE}-${DATETIME}.iso.sig PGP Digital Signature
-${IMAGENAME}-${TYPE}-${DATETIME}.manifest ISO contents
-${IMAGENAME}-${TYPE}-${DATETIME}.sha256sum Checksum
-${IMAGENAME}-${TYPE}-${DATETIME}.torrent Web Seed torrent (you client needs to support web seeds or it may not work)
+$new_iso_name_timestamped.iso Live and Installable ISO
+$new_iso_name_timestamped.iso.sig PGP Digital Signature
+$new_iso_name_timestamped.manifest ISO contents
+$new_iso_name_timestamped.sha256sum Checksum
+$new_iso_name_timestamped.torrent Web Seed torrent (you client needs to support web seeds or it may not work)
"current" files are the same files for those wanting a URL which does not change daily.
END
-echo $DATETIME > date_stamp
+fi
+
+# change ownership to make jenkins happy
+echo $DATETIME > date_stamp
pwd
chown -Rv jenkins:jenkins .
More information about the Neon-commits
mailing list