mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
build: store SOURCE_DATE_EPOCH in JSON info files
The source date epoch is the only reproducible date close to the actual
build date. It can be used for tooling like the firmware wizard to show
the image age.
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 165f0b00cd)
[store source_date_epoch as integer]
Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
parent
57293f51c4
commit
524cbcf6f5
2 changed files with 2 additions and 0 deletions
|
|
@ -532,6 +532,7 @@ define Device/Build/image
|
|||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
IMAGE_NAME="$(IMAGE_NAME)" \
|
||||
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
IMAGE_FILESYSTEM="$(1)" \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ image_info = {
|
|||
"target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")),
|
||||
"version_code": getenv("VERSION_CODE"),
|
||||
"version_number": getenv("VERSION_NUMBER"),
|
||||
"source_date_epoch": int(getenv("SOURCE_DATE_EPOCH")),
|
||||
"profiles": {
|
||||
device_id: {
|
||||
"image_prefix": getenv("IMAGE_PREFIX"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue