base-files: add SOURCE_DATE_EPOCH as OPENWRT_BUILD_DATE to os-release

This commit adds the build date during compilation to the os-release file.
This information can then be used later to output this via the the ubus,

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Florian Eckert 2022-10-20 10:02:45 +02:00 committed by Hauke Mehrtens
parent 9131cb44ff
commit 6e6b82ac5f
2 changed files with 3 additions and 1 deletions

View File

@ -104,5 +104,6 @@ VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
-e 's,%u,$(call sed_escape,$(VERSION_HOME_URL)),g' \ -e 's,%u,$(call sed_escape,$(VERSION_HOME_URL)),g' \
-e 's,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \ -e 's,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \
-e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \ -e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \
-e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g' -e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g' \
-e 's,%B,$(call sed_escape,$(SOURCE_DATE_EPOCH)),g'

View File

@ -16,3 +16,4 @@ OPENWRT_DEVICE_MANUFACTURER_URL="%m"
OPENWRT_DEVICE_PRODUCT="%P" OPENWRT_DEVICE_PRODUCT="%P"
OPENWRT_DEVICE_REVISION="%h" OPENWRT_DEVICE_REVISION="%h"
OPENWRT_RELEASE="%D %V %C" OPENWRT_RELEASE="%D %V %C"
OPENWRT_BUILD_DATE="%B"