diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 25a1da7607..7f0e333948 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -35,7 +35,10 @@ pipeline { /* Necessary to load methods */ mobile = load 'ci/mobile.groovy' cmn = load 'ci/common.groovy' + /* Cleanup and Prep */ mobile.prep(cmn.getBuildType()) + /* Run at start to void mismatched numbers */ + cmn.buildNumber() } } } diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 957722d979..edf4894627 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -31,7 +31,10 @@ pipeline { /* Necessary to load methods */ mobile = load 'ci/mobile.groovy' cmn = load 'ci/common.groovy' + /* Cleanup and Prep */ mobile.prep(cmn.getBuildType()) + /* Run at start to void mismatched numbers */ + cmn.buildNumber() } } } diff --git a/ci/android.groovy b/ci/android.groovy index 430152e4e6..3fd38f28ad 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -1,8 +1,7 @@ common = load 'ci/common.groovy' def compile(type = 'nightly') { - common.buildNumber() - // Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon + /* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */ def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false " if (type == 'release') { gradleOpt += "-PreleaseVersion='${common.version()}'" diff --git a/scripts/gen_build_no.sh b/scripts/gen_build_no.sh index 7f4b2627d0..3b5e2c9be1 100755 --- a/scripts/gen_build_no.sh +++ b/scripts/gen_build_no.sh @@ -20,7 +20,8 @@ BUILD_NUMBER_FILE="${GIT_ROOT}/BUILD_NUMBER" if [[ -f "${BUILD_NUMBER_FILE}" ]]; then cat "${BUILD_NUMBER_FILE}" else - # Format: Year(2 digit) + Month + Day + Hour + Minutes - # Example: 1812011805 - date '+%y%m%d%H%M' | tee "${BUILD_NUMBER_FILE}" + # Format: Year(4 digit) + Month + Day + Hour + # Example: 2018120118 + # We limited precision to hours to avoid of mismatched numbers. + date '+%Y%m%d%H' | tee "${BUILD_NUMBER_FILE}" fi