rules: fix empty COMMITCOUNT/AUTORELEASE
[openwrt/staging/mkresin.git] / rules.mk
index cf4aa30d213f09e586a937147fec6c403481b1fe..b658e9302084b7bb31d7ffbdc36e9df664c2b61e 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -421,7 +421,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))"; \
@@ -431,8 +431,8 @@ $(shell \
 )
 endef
 
-COMMITCOUNT = $(if $(DUMP),,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),,$(call commitcount,1))
+COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
+AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
 
 all:
 FORCE: ;