forked from sheimi/SGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (33 loc) · 1.18 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
language: android
android:
components:
- tools
- platform-tools
- build-tools-23.0.3
- android-22
- extra-android-support
- extra-android-m2repository
jdk:
- oraclejdk8
env:
global:
- TERM=dumb
before_script:
- export DATE=$(date)
- export VERSION=$(date --date="$DATE" +'%Y%m%d%H%M%S')
script:
- ./gradlew clean assembleDebug testDebug
- sed -i -r -e "s/(android:versionCode=\")[0-9]+(\")/\1$VERSION\2/g"
-e "s/(android:versionName=\"[0-9.]+)(\")/\1-dev-$VERSION\2/g"
src/main/AndroidManifest.xml
- mv src/main/java/me/sheimi/sgit src/main/java/me/sheimi/sgit_dev
- find . -type f -exec sed -i "s/me\.sheimi\.sgit/me\.sheimi\.sgit_dev/g" '{}' \;
- find src/main/res -type f -exec sed -i -r 's/(<string name="app_name">SGit)(<\/string>)/\1 Dev\2/g' '{}' \;
- cd ..
after_success:
- curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.1/update_site_branch.sh" |
bash -s -- --commands "true"
--commit-message "Build generated on $DATE by Travis [ci skip]"
--directory "build"
--distribution-branch "build"
--source-branch "dev"