sdcard_image bbclass: add timestamp to image filename
authorKoen Kooi <koen@dominion.thruhere.net>
Fri, 4 Nov 2011 07:38:41 +0000 (08:38 +0100)
committerKoen Kooi <koen@dominion.thruhere.net>
Fri, 4 Nov 2011 07:38:41 +0000 (08:38 +0100)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
classes/sdcard_image.bbclass

index e3edf6151c582cc82e38fdef5ecbab89c150ac93..bf0f0aa624d9db144563214c8a4cef012e2b49d8 100644 (file)
@@ -18,6 +18,8 @@ SDIMG_SIZE ?= "444"
 BOOTPARTNAME_beaglebone = "BEAGLE_BONE"
 BOOTPARTNAME ?= "${MACHINE}"
 
+IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
+
 IMAGE_CMD_sdimg () {
        SDIMG=${WORKDIR}/sd.img
 
@@ -121,6 +123,6 @@ IMAGE_CMD_sdimg () {
 
        ${LOSETUP} -d ${LOOPDEV_FS} || true
 
-       gzip -c ${WORKDIR}/sd.img > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-${PR}.img.gz
+       gzip -c ${WORKDIR}/sd.img > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-${IMAGEDATESTAMP}.img.gz
        rm -f ${WORKDIR}/sd.img
 }