diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 667502a..be43199 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,10 +31,10 @@ build-v6.6-debian-13-riscv64: - ./05_generate_payload.bin.sh - ./06_generate_debian_console_root.sh - ./07_create_sdcard_img.sh - - xz -vT8 deploy/images/sdcard.img - tree -s deploy/ - cp -v deploy/images/sdcard.img.xz ./deploy/ - cp -v deploy/images/sdcard.bmap ./deploy/ + - cp -v deploy/images/image.yml.txt ./deploy/ artifacts: when: on_success expire_in: 4 week @@ -43,6 +43,7 @@ build-v6.6-debian-13-riscv64: - "deploy/sdcard.img.xz" - "deploy/sdcard.bmap" - "deploy/readme.md" + - "deploy/image.yml.txt" build-v6.6-ubuntu-2404-riscv64: image: robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest @@ -70,10 +71,10 @@ build-v6.6-ubuntu-2404-riscv64: - ./05_generate_payload.bin.sh - ./06_generate_ubuntu_console_root.sh - ./07_create_sdcard_img.sh - - xz -vT8 deploy/images/sdcard.img - tree -s deploy/ - cp -v deploy/images/sdcard.img.xz ./deploy/ - cp -v deploy/images/sdcard.bmap ./deploy/ + - cp -v deploy/images/image.yml.txt ./deploy/ artifacts: when: on_success expire_in: 4 week @@ -82,3 +83,4 @@ build-v6.6-ubuntu-2404-riscv64: - "deploy/sdcard.img.xz" - "deploy/sdcard.bmap" - "deploy/readme.md" + - "deploy/image.yml.txt" diff --git a/07_create_sdcard_img.sh b/07_create_sdcard_img.sh index ab41ffe..d2eea0b 100755 --- a/07_create_sdcard_img.sh +++ b/07_create_sdcard_img.sh @@ -30,6 +30,12 @@ if [ ! -f ./images/sdcard.img ]; then exit 2 fi +extract_size=$(du -b ./images/sdcard.img | awk '{print $1}') +echo " extract_size: ${extract_size}" > ./images/image.yml.txt + +extract_sha256=$(sha256sum ./images/sdcard.img | awk '{print $1}') +echo " extract_sha256: ${extract_sha256}" >> ./images/image.yml.txt + if [ -f /usr/bin/bmaptool ] ; then if [ -f ./images/sdcard.bmap ] ; then rm -rf ./images/sdcard.bmap || true @@ -37,4 +43,22 @@ if [ -f /usr/bin/bmaptool ] ; then /usr/bin/bmaptool -d create -o ./images/sdcard.bmap ./images/sdcard.img fi +xz -T0 -z ./images/sdcard.img + +if [ ! -f ./images/sdcard.img.xz ]; then + echo "Error: ./images/sdcard.img.xz was not generated" + exit 2 +fi + +image_download_size=$(du -b ./images/sdcard.img.xz | awk '{print $1}') +echo " image_download_size: ${image_download_size}" >> ./images/image.yml.txt + +image_download_sha256=$(sha256sum ./images/sdcard.img.xz | awk '{print $1}') +echo " image_download_sha256: ${image_download_sha256}" >> ./images/image.yml.txt + +TIME=$(date +%Y-%m-%d) + +echo " release_date: '${TIME}'" >> ./images/image.yml.txt +echo " init_format: sysconf" >> ./images/image.yml.txt + #