diff --git a/Jenkinsfile b/Jenkinsfile index af9552f..78f0d63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,56 @@ pipeline { ''' } } + stage('Convert images') + { + agent { + docker { + image 'dpokidov/imagemagick' + reuseNode true + } + } + steps { + sh ''' + set -eu + + found_edition=0 + + for edition_dir in editions/*; do + [ -d "$edition_dir" ] || continue + found_edition=1 + + set -- "$edition_dir"/splash-source.* + if [ ! -e "$1" ]; then + echo "ERROR: missing splash-source.* in $edition_dir" >&2 + exit 1 + fi + if [ $# -ne 1 ]; then + echo "ERROR: multiple splash-source.* files in $edition_dir" >&2 + exit 1 + fi + + src="$1" + out="$edition_dir/splash.jpg" + + echo "Converting $src -> $out" + + magick "$src" \ + -resize 640x480! \ + -background black \ + -alpha remove -alpha off \ + -colorspace sRGB \ + -strip \ + -quality 95 \ + "$out" + done + + if [ "$found_edition" -eq 0 ]; then + echo "ERROR: no edition directory found under editions/" >&2 + exit 1 + fi + ''' + } + } stage('Create live') { agent { @@ -102,7 +152,6 @@ pipeline { chmod +x config/chroot_local-includes/usr/local/bin/neofetch cp /root/editions/voodoo2/splash.jpg config/binary_syslinux/ ''' - } } } @@ -120,7 +169,6 @@ pipeline { steps { dir('root/live') { - sh 'lh_build' } } diff --git a/editions/voodoo2/splashOrigin.png b/editions/voodoo2/splash-source.png similarity index 100% rename from editions/voodoo2/splashOrigin.png rename to editions/voodoo2/splash-source.png diff --git a/editions/voodoo2/splash.jpg b/editions/voodoo2/splash.jpg deleted file mode 100644 index 9962483..0000000 Binary files a/editions/voodoo2/splash.jpg and /dev/null differ diff --git a/editions/voodoo2/splash.pcx b/editions/voodoo2/splash.pcx deleted file mode 100644 index 0659efc..0000000 Binary files a/editions/voodoo2/splash.pcx and /dev/null differ diff --git a/editions/voodoo2/splash.png b/editions/voodoo2/splash.png deleted file mode 100644 index 84bbf52..0000000 Binary files a/editions/voodoo2/splash.png and /dev/null differ