Intermittent build failures to execute push_to_git_remote & how to manage build number

Awesome, let us know how it goes, or if you have any questions! :wink:

Iā€™d also suggest you to use the BITRISE_BUILD_NUMBER as the build number, for automatic build number ā€œbumpā€ - it makes identifying builds way easier. You can also use the env var in Gradle configs directly, via System.getenv("BITRISE_BUILD_NUMBER")

def bitriseBuildNumber = System.getenv("BITRISE_BUILD_NUMBER")
def buildNumber = bitriseBuildNumber != null ? bitriseBuildNumber : "0"

or

def buildNumber = System.getenv("BITRISE_BUILD_NUMBER") ?: "0"

Source: