From 7c8256234d1e35485926c5bd880d049861301aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 17 Jan 2019 18:24:44 +0100 Subject: [PATCH] run genBuildNumber after make clean to not remove the file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski Signed-off-by: Igor Mandrigin --- ci/Jenkinsfile.android | 2 -- ci/Jenkinsfile.ios | 2 -- ci/common.groovy | 2 +- ci/ios.groovy | 2 +- ci/mobile.groovy | 2 ++ scripts/build_no.sh | 2 ++ 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 768ad39563..3c71c3966c 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -59,8 +59,6 @@ pipeline { mobile = load 'ci/mobile.groovy' cmn = load 'ci/common.groovy' print "Running ${cmn.getBuildType()} build!" - /* Run at start to void mismatched numbers */ - cmn.buildNumber() /* Read the valid NodeJS version */ env.NODE_VERSION = cmn.getToolVersion('node') /* Cleanup and Prep */ diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 005b39beb0..dd277cb670 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -40,8 +40,6 @@ pipeline { mobile = load 'ci/mobile.groovy' cmn = load 'ci/common.groovy' print "Running ${cmn.getBuildType()} build!" - /* Run at start to void mismatched numbers */ - cmn.buildNumber() /* Read the valid NodeJS version */ env.NODE_VERSION = cmn.getToolVersion('node') /* Cleanup and Prep */ diff --git a/ci/common.groovy b/ci/common.groovy index 4590396738..9a180d3dc8 100644 --- a/ci/common.groovy +++ b/ci/common.groovy @@ -87,7 +87,7 @@ def doGitRebase() { } } -def buildNumber() { +def genBuildNumber() { def number = sh( returnStdout: true, script: "./scripts/gen_build_no.sh" diff --git a/ci/ios.groovy b/ci/ios.groovy index b90d46660f..5f2a8c53e8 100644 --- a/ci/ios.groovy +++ b/ci/ios.groovy @@ -17,7 +17,7 @@ def bundle(type) { } /* configure build metadata */ plutil('CFBundleShortVersionString', cmn.version()) - plutil('CFBundleVersion', cmn.buildNumber()) + plutil('CFBundleVersion', cmn.genBuildNumber()) plutil('CFBundleBuildUrl', currentBuild.absoluteUrl) /* the dir might not exist */ sh 'mkdir -p status-e2e' diff --git a/ci/mobile.groovy b/ci/mobile.groovy index e1a184a747..0b437bb737 100644 --- a/ci/mobile.groovy +++ b/ci/mobile.groovy @@ -37,6 +37,8 @@ def prep(type = 'nightly') { cmn.doGitRebase() /* ensure that we start from a known state */ cmn.clean() + /* Run at start to void mismatched numbers */ + cmn.genBuildNumber() /* select type of build */ switch (type) { case 'nightly': diff --git a/scripts/build_no.sh b/scripts/build_no.sh index 1c15a6e7c5..2cc52774dd 100755 --- a/scripts/build_no.sh +++ b/scripts/build_no.sh @@ -33,7 +33,9 @@ BUILD_NUMBER_FILE="${GIT_ROOT}/BUILD_NUMBER" # If running under Jenkins use a timestamp-based build number. # That build number is generated by the scripts/gen_build_no.sh script. if [[ -f "${BUILD_NUMBER_FILE}" ]]; then + echo "Build number file found, using: $(cat ${BUILD_NUMBER_FILE})" 1>&2 cat "${BUILD_NUMBER_FILE}" else + echo "Build number file missing, using: ${DEV_BUILD_NUMBER}" 1>&2 echo "${DEV_BUILD_NUMBER}" fi