Use a more appropriate minor version number

This commit is contained in:
ShirkNeko
2025-11-05 16:41:30 +08:00
parent 994fdfddf2
commit 89ce65e8ba
4 changed files with 5 additions and 5 deletions

View File

@@ -79,14 +79,14 @@ ifeq ($(KSU_GITHUB_VERSION_COMMIT),)
ifeq ($(LOCAL_GIT_EXISTS),1) ifeq ($(LOCAL_GIT_EXISTS),1)
$(shell cd $(KSU_SRC); [ -f ../.git/shallow ] && $(GIT_BIN) fetch --unshallow) $(shell cd $(KSU_SRC); [ -f ../.git/shallow ] && $(GIT_BIN) fetch --unshallow)
KSU_LOCAL_VERSION := $(shell cd $(KSU_SRC); $(GIT_BIN) rev-list --count $(REPO_BRANCH)) KSU_LOCAL_VERSION := $(shell cd $(KSU_SRC); $(GIT_BIN) rev-list --count $(REPO_BRANCH))
KSU_VERSION := $(shell expr 20000 + $(KSU_LOCAL_VERSION) + 700) KSU_VERSION := $(shell expr 40000 + $(KSU_LOCAL_VERSION) - 2815)
$(info -- $(REPO_NAME) version (local .git): $(KSU_VERSION)) $(info -- $(REPO_NAME) version (local .git): $(KSU_VERSION))
else else
KSU_VERSION := 13000 KSU_VERSION := 13000
$(warning -- Could not fetch version online or via local .git! Using fallback version: $(KSU_VERSION)) $(warning -- Could not fetch version online or via local .git! Using fallback version: $(KSU_VERSION))
endif endif
else else
KSU_VERSION := $(shell expr 20000 + $(KSU_GITHUB_VERSION_COMMIT) + 700) KSU_VERSION := $(shell expr 40000 + $(KSU_GITHUB_VERSION_COMMIT) - 2815)
$(info -- $(REPO_NAME) version (GitHub): $(KSU_VERSION)) $(info -- $(REPO_NAME) version (GitHub): $(KSU_VERSION))
endif endif

View File

@@ -871,7 +871,7 @@ private fun StatusCardPreview() {
StatusCard( StatusCard(
HomeViewModel.SystemStatus( HomeViewModel.SystemStatus(
isManager = true, isManager = true,
ksuVersion = 20000, ksuVersion = 40000,
lkmMode = true, lkmMode = true,
kernelVersion = KernelVersion(5, 10, 101), kernelVersion = KernelVersion(5, 10, 101),
isRootAvailable = true isRootAvailable = true

View File

@@ -32,7 +32,7 @@ val androidCompileSdkVersion = 36
val androidCompileNdkVersion = "29.0.14206865" val androidCompileNdkVersion = "29.0.14206865"
val androidSourceCompatibility = JavaVersion.VERSION_21 val androidSourceCompatibility = JavaVersion.VERSION_21
val androidTargetCompatibility = JavaVersion.VERSION_21 val androidTargetCompatibility = JavaVersion.VERSION_21
val managerVersionCode by extra(2 * 10000 + getGitCommitCount() + 700) val managerVersionCode by extra(4 * 10000 + getGitCommitCount() - 2815)
val managerVersionName by extra(getGitDescribe()) val managerVersionName by extra(getGitDescribe())
fun getGitCommitCount(): Int { fun getGitCommitCount(): Int {

View File

@@ -11,7 +11,7 @@ fn get_git_version() -> Result<(u32, String), std::io::Error> {
.trim() .trim()
.parse() .parse()
.map_err(|_| std::io::Error::other("Failed to parse git count"))?; .map_err(|_| std::io::Error::other("Failed to parse git count"))?;
let version_code = 20000 + 700 + version_code; // For historical reasons let version_code = 40000 - 2815 + version_code; // For historical reasons
let version_name = String::from_utf8( let version_name = String::from_utf8(
Command::new("git") Command::new("git")