Skip to content

Commit 748b78d

Browse files
committed
添加编译日期
1 parent 6efdf03 commit 748b78d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/version.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ VERSION_TAINTS := $(strip $(foreach taint,$(VERSION_TAINT_SPECS), \
6767

6868
PKG_CONFIG_DEPENDS += $(foreach taint,$(VERSION_TAINT_SPECS),$(call taint2sym,$(taint)))
6969

70+
BUILT_DATE := $(shell date +'%b %e %Y')
71+
7072
VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
7173
-e 's,%V,$(VERSION_NUMBER),g' \
7274
-e 's,%v,\L$(subst $(space),_,$(VERSION_NUMBER)),g' \
@@ -82,6 +84,7 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
8284
-e 's,%t,$(VERSION_TAINTS),g' \
8385
-e 's,%M,$(VERSION_MANUFACTURER),g' \
8486
-e 's,%P,$(VERSION_PRODUCT),g' \
85-
-e 's,%h,$(VERSION_HWREV),g'
87+
-e 's,%h,$(VERSION_HWREV),g' \
88+
-e 's,%B,$(BUILT_DATE),g'
8689

8790
VERSION_SED_SCRIPT:=$(subst '\'','\'\\\\\'\'',$(VERSION_SED))

package/base-files/files/etc/openwrt_release

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ DISTRIB_RELEASE='%C'
33
DISTRIB_REVISION='%R'
44
DISTRIB_CODENAME='%n'
55
DISTRIB_TARGET='%S'
6-
DISTRIB_DESCRIPTION='%D %N %V'
6+
DISTRIB_DESCRIPTION='%D %N %V.Built at %B'
77
DISTRIB_TAINTS='%t'

0 commit comments

Comments
 (0)