build: store source_date_epoch as integer integer
authorPaul Spooren <mail@aparcar.org>
Sun, 29 Aug 2021 03:10:57 +0000 (17:10 -1000)
committerPaul Spooren <mail@aparcar.org>
Sun, 29 Aug 2021 18:27:55 +0000 (08:27 -1000)
The value is retreived from a env variable which defaults to be read as
a string. However the SOURCE_DATE_EPOCH is a unix timestamp aka integer.

Fix this to allow downstream tools to parse the value directly.

Signed-off-by: Paul Spooren <mail@aparcar.org>
scripts/json_add_image_info.py

index 38cd3c487d00a8809d0a7df4ecc4cbc12cfe52b8..12a9092d9624cef27ee8284d0953d1bf3c48d663 100755 (executable)
@@ -44,7 +44,7 @@ image_info = {
     "target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")),
     "version_code": getenv("VERSION_CODE"),
     "version_number": getenv("VERSION_NUMBER"),
-    "source_date_epoch": getenv("SOURCE_DATE_EPOCH"),
+    "source_date_epoch": int(getenv("SOURCE_DATE_EPOCH")),
     "profiles": {
         device_id: {
             "image_prefix": getenv("DEVICE_IMG_PREFIX"),