Commit 68631cea authored by Daniel Agar's avatar Daniel Agar Committed by GitHub

android separate daily build deploy (#4947)

parent 6742bd85
......@@ -187,21 +187,17 @@ script:
after_success:
- cd ${TRAVIS_BUILD_DIR}
# android google play deploy
- export GOOGLE_PLAY_TRACK=none;
# master development builds to beta track
# tagged releases first to beta track then manually move to production
- if [ "${TRAVIS_TAG}" ]; then
GOOGLE_PLAY_TRACK=beta;
elif [ "${TRAVIS_BRANCH}" = "master" ]; then
GOOGLE_PLAY_TRACK=beta;
GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrol
else
GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrolbeta
fi
- if [[ "${SPEC}" = "android-g++" && "${TRAVIS_PULL_REQUEST}" = "false" && "${GOOGLE_PLAY_TRACK}" != "none" ]]; then
- if [[ "${SPEC}" = "android-g++" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
pip install --user google-api-python-client PyOpenSSL &&
echo "Google Play Track:" ${GOOGLE_PLAY_TRACK} &&
openssl aes-256-cbc -K $encrypted_25db6eb7c3fd_key -iv $encrypted_25db6eb7c3fd_iv -in android/Google_Play_Android_Developer-4432a3c4f5d1.json.enc -out android/Google_Play_Android_Developer-4432a3c4f5d1.json -d &&
./tools/google_play_upload.py ${GOOGLE_PLAY_TRACK} org.mavlink.qgroundcontrol ${SHADOW_BUILD_DIR}/release/package/QGroundControl.apk;
./tools/google_play_upload.py production ${GOOGLE_PLAY_PKG} ${SHADOW_BUILD_DIR}/release/package/QGroundControl.apk;
fi
before_deploy:
......
......@@ -10,6 +10,15 @@ VERSIONCODE=$(($(($patch*1000)) + $VERSIONCODE))
VERSIONCODE=$(($(($dev)) + $VERSIONCODE))
MANIFEST_FILE=android/AndroidManifest.xml
# manifest package
if [ ${#dev} -gt 0 ]; then
QGC_PKG_NAME="org.mavlink.qgroundcontrolbeta"
sed -i -e 's/package *= *"[^"]*"/package="'$QGC_PKG_NAME'"/' $MANIFEST_FILE
echo "Android package name: $QGC_PKG_NAME"
fi
# android:versionCode
if [ -n "$VERSIONCODE" ]; then
sed -i -e "s/android:versionCode=\"[0-9][0-9]*\"/android:versionCode=\"$VERSIONCODE\"/" $MANIFEST_FILE
echo "Android version: ${VERSIONCODE}"
......@@ -18,6 +27,7 @@ else
exit 0 # don't cause the build to fail
fi
# android:versionName
if [ -n "$VERSIONNAME" ]; then
sed -i -e 's/versionName *= *"[^"]*"/versionName="'$VERSIONNAME'"/' $MANIFEST_FILE
echo "Android name: ${VERSIONNAME}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment