-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.travis.yml
37 lines (30 loc) · 1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: android
jdk:
- oraclejdk8
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_install:
- yes | sdkmanager 'platforms;android-27'
before_script:
- git fetch --unshallow
- version="$(git describe --long --tags | sed 's/^v//;s/-\([0-9]\+\)-g\([0-9a-f]\+\)/+\1.\2/')"
- sed -i 's/versionName .*/versionName "'"${version}"'"/' app/build.gradle
- grep 'versionName' app/build.gradle
- cp signing.properties.travis signing.properties
after_success:
- cp app/build/outputs/apk/release/app-release.apk "douya-ci-${version}.apk"
- >-
description="$(git show -s --format='> Commit: %H%n> Author: %an%n> Date: %ad%n%n%s%+b')"
- ./upload-to-releases.sh 'zhanghai/DouyaCiBuilds' "${version}" "${description}" "douya-ci-${version}.apk"
after_failure:
- cat app/build/reports/lint-results*.html