diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-03-12 10:53:00 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-03-12 11:20:12 +0100 |
commit | d63281697056ad22a70a7c663bf09e55cbb5a4e0 (patch) | |
tree | cc947883bb2af4f7eedd99ceda2823eef6d36d1e /android | |
parent | fc8fd3af8055c4e0958fc480968dd0e93b052e4d (diff) | |
download | qtlocation-mapboxgl-d63281697056ad22a70a7c663bf09e55cbb5a4e0.tar.gz |
only upload the artifact we're building
fixes #982
Diffstat (limited to 'android')
-rwxr-xr-x | android/scripts/common.sh | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/android/scripts/common.sh b/android/scripts/common.sh index 48b441ba59..0d610909bc 100755 --- a/android/scripts/common.sh +++ b/android/scripts/common.sh @@ -4,16 +4,37 @@ set -e set -o pipefail NAME=$1 -export JOBS=`nproc` + +case `uname -s` in + 'Darwin') export JOBS=`sysctl -n hw.ncpu` ;; + 'Linux') export JOBS=`nproc` ;; + *) export JOBS=1 ;; +esac + export CC=clang CXX=clang++ export MASON_PLATFORM=android -mkdir ./android/java/MapboxGLAndroidSDKTestApp/src/main/res/raw/ +mkdir -p ./android/java/MapboxGLAndroidSDKTestApp/src/main/res/raw/ echo "${MAPBOX_ACCESS_TOKEN}" >> ./android/java/MapboxGLAndroidSDKTestApp/src/main/res/raw/token.txt make android -j$JOBS BUILDTYPE=$BUILDTYPE JOBS=$JOBS -aws s3 cp ./build/android-${ANDROID_ABI}/${BUILDTYPE}/lib.target/libmapbox-gl.so s3://mapbox/mapbox-gl-native/android/build/${NAME}/libmapbox-gl.so -aws s3 cp ./android/java/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug.apk s3://mapbox/mapbox-gl-native/android/build/${NAME}/MapboxGLAndroidSDKTestApp-debug.apk -aws s3 cp ./android/java/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-release-unsigned.apk s3://mapbox/mapbox-gl-native/android/build/${NAME}/MapboxGLAndroidSDKTestApp-release-unsigned.apk +S3_PREFIX=s3://mapbox/mapbox-gl-native/android/build/${NAME} +APK_OUTPUTS=./android/java/MapboxGLAndroidSDKTestApp/build/outputs/apk + +# Upload the shared object. +aws s3 cp \ + ./build/android-${ANDROID_ABI}/${BUILDTYPE}/lib.target/libmapbox-gl.so \ + ${S3_PREFIX}/libmapbox-gl.so + +# Upload either the debug or the release build +if [ ${BUILDTYPE} == "Debug" ] ; then + aws s3 cp \ + ${APK_OUTPUTS}/MapboxGLAndroidSDKTestApp-debug.apk \ + ${S3_PREFIX}/MapboxGLAndroidSDKTestApp-debug.apk +elif [ ${BUILDTYPE} == "Release" ] ; then + aws s3 cp \ + ${APK_OUTPUTS}/MapboxGLAndroidSDKTestApp-release-unsigned.apk \ + ${S3_PREFIX}/MapboxGLAndroidSDKTestApp-release-unsigned.apk +fi |