run genBuildNumber after make clean to not remove the file

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Jakub Sokołowski 2019-01-17 18:24:44 +01:00 committed by Igor Mandrigin
parent 4462ebf78a
commit 7c8256234d
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
6 changed files with 6 additions and 6 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -87,7 +87,7 @@ def doGitRebase() {
}
}
def buildNumber() {
def genBuildNumber() {
def number = sh(
returnStdout: true,
script: "./scripts/gen_build_no.sh"

View File

@ -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'

View File

@ -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':

View File

@ -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