Kernel: use main branch commit count for consistent versioning (#209)

This commit is contained in:
Prslc
2025-06-23 18:59:30 +08:00
committed by ShirkNeko
parent 4c4dce98f4
commit ddea10e0d8

View File

@@ -30,7 +30,7 @@ KSU_GITHUB_VERSION := $(shell $(CURL_BIN) -sI "https://api.github.com/repos/$(RE
ifeq ($(KSU_GITHUB_VERSION),) ifeq ($(KSU_GITHUB_VERSION),)
ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0) ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0)
$(shell cd $(srctree)/$(src); [ -f ../.git/shallow ] && $(GIT_BIN) fetch --unshallow) $(shell cd $(srctree)/$(src); [ -f ../.git/shallow ] && $(GIT_BIN) fetch --unshallow)
KSU_LOCAL_VERSION := $(shell cd $(srctree)/$(src); $(GIT_BIN) rev-list --count HEAD) KSU_LOCAL_VERSION := $(shell cd $(srctree)/$(src); $(GIT_BIN) rev-list --count $(REPO_BRANCH))
$(eval KSU_VERSION := $(shell expr 10000 + $(KSU_LOCAL_VERSION) + 700)) $(eval KSU_VERSION := $(shell expr 10000 + $(KSU_LOCAL_VERSION) + 700))
$(info -- SukiSU-Ultra version (local .git): $(KSU_VERSION)) $(info -- SukiSU-Ultra version (local .git): $(KSU_VERSION))
else else