diff --git a/core/build.gradle.kts b/core/build.gradle.kts index fd373baae..d45404450 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -97,7 +97,7 @@ configure { } fun Project.buildNumber(): Int = - System.getenv("BUILD_NUMBER")?.let { Integer.parseInt(it) } ?: -1 + (System.getenv("GITHUB_RUN_NUMBER") ?: jenkinsBuildNumber())?.let { Integer.parseInt(it) } ?: -1 inner class GitInfo { val branch: String @@ -129,3 +129,6 @@ inner class GitInfo { repository = git?.repository?.config?.getString("remote", "origin", "url") ?: "" } } + +// todo remove this when we're not using Jenkins anymore +private fun jenkinsBuildNumber(): String? = System.getenv("BUILD_NUMBER")