Skip to content

Commit fd58354

Browse files
committed
fix: Update package versioning format in boot image generator script
- Modified the package version assignment to prefix the SHA256 hash with '0.' for valid Debian versioning. - Ensured the first 12 characters of the SHA256 hash are used for the version, improving compliance with Debian packaging standards.
1 parent 3ddaeea commit fd58354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service/rpi-sb-image-bootimg-generator.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ announce_start "Debian package creation"
256256
# Calculate SHA256 of the image file for versioning
257257
log "Calculating SHA256 of image file..."
258258
IMAGE_SHA256=$(sha256sum "${IMAGE_PATH}" | awk '{print $1}')
259-
# Use first 12 characters as version
260-
PACKAGE_VERSION="${IMAGE_SHA256:0:12}"
259+
# Use first 12 characters as version, prefix with 0. to ensure valid Debian version
260+
PACKAGE_VERSION="0.$(printf '%s' "${IMAGE_SHA256}" | cut -c1-12)"
261261
log "Package version: ${PACKAGE_VERSION}"
262262

263263
# Package name

0 commit comments

Comments
 (0)