diff --git a/.travis.android.sh b/.travis.android.sh index 5f9e8d79..f874442a 100644 --- a/.travis.android.sh +++ b/.travis.android.sh @@ -34,11 +34,11 @@ npm run cordova:build:android > android.build.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy android.build.log scw:kalisio-builds/${BUILD_BUCKET}/android.build.log -check_code $EXIT_CODE "Building the app" +check_code $EXIT_CODE 0 "Building the app" # Backup the android build to S3 rclone copy src-cordova/platforms/android/app/build/outputs/apk scw:kalisio-builds/${BUILD_BUCKET}/android > /dev/null -check_code $? "Copying the artefact to s3" +check_code $? 0 "Copying the artefact to s3" travis_fold end "build" @@ -57,7 +57,7 @@ fastlane android $NODE_APP_INSTANCE > android.deploy.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy android.deploy.log scw:kalisio-builds/${BUILD_BUCKET}/android.deploy.log -check_code $? "Deploying the app" +check_code $? 0 "Deploying the app" travis_fold end "deploy" diff --git a/.travis.app.sh b/.travis.app.sh index 70f9f833..8eac9c5e 100644 --- a/.travis.app.sh +++ b/.travis.app.sh @@ -25,17 +25,17 @@ travis_fold start "build" yarn build EXIT_CODE=$? tail -n 24 build.log -check_code $EXIT_CODE "Builing the client" +check_code $EXIT_CODE 0 "Builing the client" # Log in to docker before building the app because of rate limiting docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD" -check_code $? "Connecting to Docker" +check_code $? 0 "Connecting to Docker" # Create an archive to speed docker build process and build the image cd ../.. tar --exclude='kalisio/aktnmap/test' -zcf kalisio.tgz kalisio docker build --build-arg APP=$APP --build-arg FLAVOR=$FLAVOR --build-arg BUILD_NUMBER=$BUILD_NUMBER -f dockerfile -t kalisio/$APP:$TAG . -check_code $? "Building the app docker image" +check_code $? 0 "Building the app docker image" travis_fold end "build" diff --git a/.travis.env.sh b/.travis.env.sh index fd05420d..013c9776 100644 --- a/.travis.env.sh +++ b/.travis.env.sh @@ -2,8 +2,8 @@ check_code() { - if [ $1 -eq 1 ]; then - echo "$2 has failed [error: $1]" + if [ $1 -eq $2 ]; then + echo "$3 has failed [error: $1]" exit 1 fi } diff --git a/.travis.ios.sh b/.travis.ios.sh index 38d06a13..edb831e1 100644 --- a/.travis.ios.sh +++ b/.travis.ios.sh @@ -57,11 +57,11 @@ npm run cordova:build:ios > ios.build.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy ios.build.log scw:kalisio-builds/${BUILD_BUCKET}/ios.build.log -# check_code $EXIT_CODE "Building the app" +check_code $EXIT_CODE 1 "Building the app" # Backup the ios build to S3 rclone copy src-cordova/platforms/ios/build scw:kalisio-builds/${BUILD_BUCKET}/ios > /dev/null -check_code $? "Copying the artefact to s3" +check_code $? 0 "Copying the artefact to s3" travis_fold end "build" @@ -75,7 +75,7 @@ xcrun altool --upload-app -t ios -f "./src-cordova/platforms/ios/build/device/$T EXIT_CODE=$? # Copy the log whatever the result rclone copy ios.deploy.log scw:kalisio-builds/${BUILD_BUCKET}/ios.deploy.log -check_code $EXIT_CODE "Deploying the app" +check_code $EXIT_CODE 0 "Deploying the app" travis_fold end "deploy" diff --git a/src-cordova/config.xml.tpl b/src-cordova/config.xml.tpl index bb9d4dad..40d08674 100644 --- a/src-cordova/config.xml.tpl +++ b/src-cordova/config.xml.tpl @@ -67,8 +67,7 @@ - - + diff --git a/src-cordova/hooks/ios-run-pods.sh b/src-cordova/hooks/ios-install-pod.sh old mode 100755 new mode 100644 similarity index 100% rename from src-cordova/hooks/ios-run-pods.sh rename to src-cordova/hooks/ios-install-pod.sh diff --git a/src-cordova/hooks/ios-update-pods.sh b/src-cordova/hooks/ios-update-pods.sh deleted file mode 100755 index bc15ce7d..00000000 --- a/src-cordova/hooks/ios-update-pods.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Please refer to: -# https://github.com/phonegap/phonegap-plugin-push/issues/2845 -# https://github.com/CocoaPods/CocoaPods/issues/6223#issuecomment-262277995 -# Should be temporary and fixed in the future with: -# https://github.com/apache/cordova-ios/pull/719 - -#pod init - -#mkdir -p ~/.cocoapods/repos -#git clone https://github.com/CocoaPods/Specs ~/.cocoapods/repos/master - -#pod setup - - -