Jenkinsfile.release: use BRANCH_NAME

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
This commit is contained in:
Oskar Thoren 2018-02-13 19:37:21 +08:00 committed by Eric Dvorsak
parent 7e1376aeaa
commit cffa4c5759
No known key found for this signature in database
GPG Key ID: 932AC1CE5F05DE0C
1 changed files with 7 additions and 6 deletions

View File

@ -27,12 +27,13 @@ node ('macos1'){
try {
stage('Git & Dependencies') {
slackSend color: 'good', message: 'Release build started. ' + env.BUILD_URL
git([url: 'https://github.com/status-im/status-react.git', branch: 'develop'])
// Checkout master because used for iOS Plist version information
sh 'git fetch --tags'
slackSend color: 'good', message: BRANCH_NAME + ' build started. ' + env.BUILD_URL
checkout scm
sh 'git checkout -- .'
sh 'git checkout develop'
sh 'git checkout remotes/origin/' + BRANCH_NAME
sh 'git fetch --tags'
sh 'rm -rf node_modules'
sh 'cp .env.prod .env'
sh 'lein deps'
@ -95,4 +96,4 @@ node ('macos1'){
def c = (testPassed ? 'good' : 'warning' )
slackSend color: c, message: 'Release build \nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
}
}
}