update jenkinsfiles and build.gradle to use build_no.sh
This commit is contained in:
parent
176817dc55
commit
f97fec1547
|
@ -63,13 +63,17 @@ node ('macos1'){
|
|||
}
|
||||
|
||||
stage('Build (iOS)') {
|
||||
def build_no = sh(returnStdout: true, script: 'git rev-list --count HEAD').trim()
|
||||
def build_no = sh(returnStdout: true, script: './build_no.sh').trim()
|
||||
sh ('plutil -replace CFBundleShortVersionString -string ' + version + ' ios/StatusIm/Info.plist')
|
||||
sh ('plutil -replace CFBundleVersion -string ' + build_no + ' ios/StatusIm/Info.plist')
|
||||
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
||||
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist ~/archive.plist'
|
||||
}
|
||||
|
||||
stage('Push Build Tag') {
|
||||
sh ('git push --tags')
|
||||
}
|
||||
|
||||
stage('Deploy (Android)') {
|
||||
def artifact_dir = pwd() + '/android/app/build/outputs/apk/release/'
|
||||
println (artifact_dir + 'app-release.apk')
|
||||
|
|
|
@ -66,7 +66,7 @@ node ('macos1'){
|
|||
|
||||
stage('Build (iOS)') {
|
||||
withCredentials([string(credentialsId: 'jenkins_pass', variable: 'password')]) {
|
||||
def build_no = sh(returnStdout: true, script: 'git rev-list --count HEAD').trim()
|
||||
def build_no = sh(returnStdout: true, script: './build_no.sh').trim()
|
||||
sh ('plutil -replace CFBundleShortVersionString -string ' + version + ' ios/StatusIm/Info.plist')
|
||||
sh ('plutil -replace CFBundleVersion -string ' + build_no + ' ios/StatusIm/Info.plist')
|
||||
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
||||
|
@ -75,6 +75,10 @@ node ('macos1'){
|
|||
}
|
||||
}
|
||||
|
||||
stage('Push build tag') {
|
||||
sh ('git push --tags')
|
||||
}
|
||||
|
||||
stage('Deploy (Android)') {
|
||||
sh ('bundle exec fastlane android release || exit 0')
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ def enableProguardInReleaseBuilds = false
|
|||
def getVersionCode = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
exec {
|
||||
commandLine "git", "rev-list", "--count", "HEAD"
|
||||
commandLine "./build_no.sh"
|
||||
standardOutput = stdOut
|
||||
}
|
||||
return stdOut.toString().toInteger()
|
||||
|
|
Loading…
Reference in New Issue