[openwrt/openwrt] build: store source_date_epoch as integer

LEDE Commits lede-commits at lists.infradead.org
Mon Feb 14 05:40:41 PST 2022


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2120cad38d6f78cc1b727459eeedb6ed9a14edbe

commit 2120cad38d6f78cc1b727459eeedb6ed9a14edbe
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sat Aug 28 17:10:57 2021 -1000

    build: store source_date_epoch as integer
    
    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 at aparcar.org>
---
 scripts/json_add_image_info.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py
index 23033f9fc4..4608996f02 100755
--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -44,7 +44,7 @@ file_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"),



More information about the lede-commits mailing list