fix(build): floor versionCode above shipped 298
The 2026-07-08 public-release history scrub (0f1143a) rewrote history
and dropped `git rev-list --count` below the build number already
shipped to testers (298), so post-scrub builds (291, 294) read as
downgrades. Add a floor offset so versionCode clears 298 and stays
monotonic across the rewrite: the current count maps to 300, and each
later commit still increments by one.
This commit is contained in:
@@ -28,7 +28,14 @@ abstract class GitExecutor @Inject constructor(private val execOperations: ExecO
|
||||
// Instantiate the helper class using Gradle's object factory
|
||||
val gitExecutor = objects.newInstance(GitExecutor::class.java)
|
||||
|
||||
val gitCommitCount = gitExecutor.execute("git rev-list HEAD --count", rootDir).toInt()
|
||||
// versionCode = git commit count + floor offset. The 2026-07-08 public-release
|
||||
// history scrub (0f1143a) rewrote history and dropped the raw commit count below
|
||||
// the build number already shipped to testers (298), so post-scrub counts read as
|
||||
// downgrades. The floor offset lifts versionCode back above that peak and keeps it
|
||||
// monotonic across the rewrite; each later commit still bumps it by one.
|
||||
val versionCodeFloorOffset = 5
|
||||
val gitCommitCount =
|
||||
gitExecutor.execute("git rev-list HEAD --count", rootDir).toInt() + versionCodeFloorOffset
|
||||
val gitCommitHash = gitExecutor.execute("git rev-parse --verify --short HEAD", rootDir)
|
||||
val verName = "v6.0.1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user