]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
build: make GL.iNet metadata reproducible main master
authorPaul Spooren <mail@aparcar.org>
Thu, 23 Jul 2026 12:39:19 +0000 (14:39 +0200)
committerPaul Spooren <mail@aparcar.org>
Thu, 23 Jul 2026 12:39:19 +0000 (14:39 +0200)
The GL.iNet specific metadata contains a `date`-field which takes the current
timestamp instead of using SOURCE_DATE_EPOCH. This commits make use of the
variable, if available.

Signed-off-by: Paul Spooren <mail@aparcar.org>
include/image-commands.mk

index 32aea3e54365f327fb8c9c09818080384448a2d1..e6b526dc56a14cfeed693b36da65c78564352dfa 100644 (file)
@@ -110,7 +110,7 @@ metadata_gl_json = \
                $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \
                "version": { \
                        "release": "$(call json_quote,$(VERSION_NUMBER))", \
-                       "date": "$(shell TZ='Asia/Chongqing' date '+%Y%m%d%H%M%S')", \
+                       "date": "$(shell TZ='Asia/Chongqing' date $(if $(SOURCE_DATE_EPOCH),-d@$(SOURCE_DATE_EPOCH)) '+%Y%m%d%H%M%S')", \
                        "dist": "$(call json_quote,$(VERSION_DIST))", \
                        "version": "$(call json_quote,$(VERSION_NUMBER))", \
                        "revision": "$(call json_quote,$(REVISION))", \