// Checkout master because used for iOS Plist version information
sh 'git fetch --tags'
sh 'git checkout -- .'
sh 'git checkout develop'
sh 'rm -rf node_modules'
sh 'cp .env.prod .env'
sh 'lein deps'
installJSDeps()
sh '[ -f node_modules/react-native/packager/src/JSTransformer/index.js ] && sed -i "" "s/301000/1201000/g" node_modules/react-native/packager/src/JSTransformer/index.js || echo "New packager"'
// Fix silly RN upgrade weird env issue
sh 'cp findSymlinkedModules.js.patch node_modules/react-native/local-cli/util/findSymlinkedModules.js'
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'
sh 'cd ios && pod install && cd ..'
}
stage('Tests') {
sh 'lein test-cljs'
}
stage('Build') {
sh 'lein prod-build'
}
stage('Build (Android)') {
sh 'cd android && ./gradlew assembleRelease'
}
stage('Build (iOS)') {
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'