mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
85 lines
2.9 KiB
Diff
85 lines
2.9 KiB
Diff
From f27e3d4a67ac9adc43159aa33e3e0b88aa33552a Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Sat, 29 Aug 2020 08:25:41 +0200
|
|
Subject: [PATCH 23/40] base-files: add the wlan-ap repo hash
|
|
|
|
currently the banner will show the revision of the build tree.
|
|
This patch adds the hash of the wlan-ap tree.
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
include/version.mk | 3 +++
|
|
package/base-files/files/etc/banner | 1 +
|
|
package/base-files/files/etc/openwrt_release | 1 +
|
|
package/base-files/files/etc/openwrt_version | 1 +
|
|
scripts/getver.sh | 6 ++++++
|
|
5 files changed, 12 insertions(+)
|
|
|
|
diff --git a/include/version.mk b/include/version.mk
|
|
index db0167d811..55b3b3b1da 100644
|
|
--- a/include/version.mk
|
|
+++ b/include/version.mk
|
|
@@ -59,6 +59,8 @@ VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic)
|
|
VERSION_HWREV:=$(call qstrip,$(CONFIG_VERSION_HWREV))
|
|
VERSION_HWREV:=$(if $(VERSION_HWREV),$(VERSION_HWREV),v0)
|
|
|
|
+VERSION_TIP:=$(shell $(TOPDIR)/scripts/getver.sh wlan-ap)
|
|
+
|
|
define taint2sym
|
|
$(CONFIG_$(firstword $(subst :, ,$(subst +,,$(subst -,,$(1))))))
|
|
endef
|
|
@@ -107,5 +109,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,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \
|
|
-e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \
|
|
+ -e 's,%a,$(call sed_escape,$(VERSION_TIP)),g' \
|
|
-e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g'
|
|
|
|
diff --git a/package/base-files/files/etc/banner b/package/base-files/files/etc/banner
|
|
index f73423bad4..53e3cfcf4a 100644
|
|
--- a/package/base-files/files/etc/banner
|
|
+++ b/package/base-files/files/etc/banner
|
|
@@ -4,5 +4,6 @@
|
|
|_______|| __|_____|__|__||________|__|__| |__|
|
|
|__| W I R E L E S S F R E E D O M
|
|
---------------------------------------------------
|
|
+ ApNos-%a
|
|
%D %V, %C
|
|
---------------------------------------------------
|
|
diff --git a/package/base-files/files/etc/openwrt_release b/package/base-files/files/etc/openwrt_release
|
|
index d03400ca05..11eb7f0361 100644
|
|
--- a/package/base-files/files/etc/openwrt_release
|
|
+++ b/package/base-files/files/etc/openwrt_release
|
|
@@ -5,3 +5,4 @@ DISTRIB_TARGET='%S'
|
|
DISTRIB_ARCH='%A'
|
|
DISTRIB_DESCRIPTION='%D %V %C'
|
|
DISTRIB_TAINTS='%t'
|
|
+DISTRIB_TIP='%a'
|
|
diff --git a/package/base-files/files/etc/openwrt_version b/package/base-files/files/etc/openwrt_version
|
|
index 48157ed97f..bb0ef233ac 100644
|
|
--- a/package/base-files/files/etc/openwrt_version
|
|
+++ b/package/base-files/files/etc/openwrt_version
|
|
@@ -1 +1,2 @@
|
|
+ApNos-%a
|
|
%C
|
|
diff --git a/scripts/getver.sh b/scripts/getver.sh
|
|
index 9175f411db..d62ba56621 100755
|
|
--- a/scripts/getver.sh
|
|
+++ b/scripts/getver.sh
|
|
@@ -3,6 +3,12 @@ export LANG=C
|
|
export LC_ALL=C
|
|
[ -n "$TOPDIR" ] && cd $TOPDIR
|
|
|
|
+[ "$1" = "wlan-ap" ] && {
|
|
+ cd ..
|
|
+ git log -n 1 --format="%h"
|
|
+ exit 0
|
|
+}
|
|
+
|
|
GET_REV=$1
|
|
|
|
try_version() {
|
|
--
|
|
2.25.1
|
|
|