Skip to content

Commit

Permalink
chore: Add time stamps for local builds to improve differentiation
Browse files Browse the repository at this point in the history
  • Loading branch information
half-nothing committed Jan 6, 2025
1 parent 9ea036d commit ce515ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ fun getVersionMetadata(): String {
val workflow = System.getenv("GITHUB_WORKFLOW")
val release = System.getenv("RELEASE")

if (workflow == "Release" || release != null) {
if (workflow == "Release" || !release.isNullOrBlank()) {
return ""
}

// CI builds only
if (buildId != null) {
if (!release.isNullOrBlank()) {
return "+build.$buildId"
}

// No tracking information could be found about the build
return "+nightly"
return "+nightly.${(System.currentTimeMillis() % 1e6).toInt().toString().padStart(6, '0')}"
}

0 comments on commit ce515ec

Please sign in to comment.