[openwrt/openwrt] rules: fix broken commitcount on alpine system

LEDE Commits lede-commits at lists.infradead.org
Sun Dec 18 05:19:12 PST 2022


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/eb7ffeafbfa78235b05abb4ae479376150d7a814

commit eb7ffeafbfa78235b05abb4ae479376150d7a814
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat Dec 17 16:39:00 2022 +0100

    rules: fix broken commitcount on alpine system
    
    To generate commitcount we use grep --max-count. This is not present on
    alpine grep and cause wrong generation. Use -m as it's just the short
    version of --max-count and more portable.
    
    Fixes: #11200
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index 2de43d490d..e17852e021 100644
--- a/rules.mk
+++ b/rules.mk
@@ -409,7 +409,7 @@ $(shell \
   if git log -1 >/dev/null 2>/dev/null; then \
     if [ -n "$(1)" ]; then \
       last_bump="$$(git log --pretty=format:'%h %s' . | \
-        grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
+        grep -m 1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
         cut -f 1 -d ' ')"; \
     fi; \
     if [ -n "$$last_bump" ]; then \




More information about the lede-commits mailing list