diff --git a/.travis.yml b/.travis.yml index 369e75452a550566c1d55b8f4ed0551a5775c4f8..b3baae71466f289dc9113cab40e02ef379346528 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,7 +114,7 @@ before_script: - if [ "${CONFIG}" != "doxygen" ]; then mkdir ${SHADOW_BUILD_DIR} && cd ${SHADOW_BUILD_DIR} && qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC}; fi script: - - cd ${TRAVIS_BUILD_DIR} && ./tools/update_android_version.sh + - if [ "${TRAVIS_OS_NAME}" = "android" ]; then cd ${TRAVIS_BUILD_DIR} && ./tools/update_android_version.sh; fi - echo 'Building QGroundControl' && echo -en 'travis_fold:start:script.1\\r' - if [ "${CONFIG}" != "doxygen" ]; then cd ${SHADOW_BUILD_DIR} && make -j4; fi - if [ "${CONFIG}" = "doxygen" ]; then cd ${TRAVIS_BUILD_DIR}/src && doxygen documentation.dox; fi @@ -170,6 +170,7 @@ deploy: skip_cleanup: true branch: master on: + tags: true condition: $CONFIG = doxygen notifications: diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 251c85ae40c045e71064d7b25994c12bad609d1b..8ad0e2fd1c83b7848ef0f72d27b256a47cc3d6f3 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/tools/update_android_version.sh b/tools/update_android_version.sh index 02cdafff5d27b166647db5c7574ea18e668b92d5..a8b3b86d156a0a2753224f03a61dd215956ff9a8 100755 --- a/tools/update_android_version.sh +++ b/tools/update_android_version.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# this requires `master` in the git tree +# travis-ci branch builds are unable to set the version properly + MANIFEST_FILE=android/AndroidManifest.xml VERSIONCODE=`git rev-list master --first-parent --count` @@ -13,7 +16,7 @@ if [ -n "$VERSIONCODE" ]; then echo "Android version: ${VERSIONCODE}" else echo "Error versionCode empty" - exit 1 + exit 0 # don't cause the build to fail fi if [ -n "$VERSIONNAME" ]; then @@ -21,5 +24,5 @@ if [ -n "$VERSIONNAME" ]; then echo "Android name: ${VERSIONNAME}" else echo "Error versionName empty" - exit 1 + exit 0 # don't cause the build to fail fi