Skip to content

Commit 4105a6e

Browse files
committed
update Makefile to use new image name schema
1 parent 85198d0 commit 4105a6e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ get-deb: clean-deb
2323
fi
2424

2525
rename-zip:
26+
# Get current date in YYYY-MM-DD format
27+
$(eval DATE := $(shell date +%Y-%m-%d))
2628
# Unzip the file so we can rename the image file
27-
unzip -o deploy/image_Kolibri-lite.zip -d deploy
29+
unzip -o deploy/image_$(DATE)-Kolibri-lite.zip -d deploy
2830
# Clean up the original zip file
29-
rm deploy/image_Kolibri-lite.zip
31+
rm deploy/image_$(DATE)-Kolibri-lite.zip
3032
# Get the version based on the debian file name kolibri_<version>-0ubuntu1_all.deb
3133
$(eval VERSION=$(shell ls ${DIST_DIR} | grep kolibri | sed 's/kolibri_\(.*\)-0ubuntu1_all.deb/\1/'))
3234
# Rename the image file to include the version
33-
mv deploy/Kolibri-lite.img deploy/kolibri-pi-image-$(VERSION).img
35+
mv deploy/$(DATE)-Kolibri-lite.img deploy/kolibri-pi-image-$(VERSION).img
3436
# Zip the image file back up
3537
zip -j deploy/kolibri-pi-image-$(VERSION).zip deploy/kolibri-pi-image-$(VERSION).img
3638
# Clean up the extracted image file

0 commit comments

Comments
 (0)