From: Paul Spooren Date: Tue, 26 Jan 2021 17:16:36 -1000 Subject: rules: fix COMMITCOUNT logic The newly added $(COMMITCOUNT) variable was wrongly increased by plus one. The addition should have been only added to $(AUTORELEASE) as OpenWrt traditionally starts counting at one rather than zero. $(AUTORELEASE) counts the commits since the last bump, which is zero on the version bump commit itself. This commit increases $(AUTORELEASE) by one while leaving $(COMMITCOUNT) as is. The base-files package is the only package using $(COMMITCOUNT) so far and requires a pseudo commit to keep the PKG_RELEASE correct. A non functional change (Copyright bump) is done in the next commit. Signed-off-by: Paul Spooren (cherry picked from commit 513f7171a3e509bba54ecc2af2d6259c7cbff221) diff --git a/rules.mk b/rules.mk index 7c1f39ccf4023601a7647f4eaf648b6392f480b9..8bfc67fb2cd43e3ce4330fd28b398722858d3493 100644 --- a/rules.mk +++ b/rules.mk @@ -417,7 +417,7 @@ $(shell \ if [ -n "$$last_bump" ]; then \ echo -n $$(($$(git rev-list --count "$$last_bump..HEAD" .) + 1)); \ else \ - echo -n $$(($$(git rev-list --count HEAD .) + 1)); \ + git rev-list --count HEAD .; \ fi; \ else \ secs="$$(($(SOURCE_DATE_EPOCH) % 86400))"; \