forked from sheimi/SGit
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
32 lines (32 loc) · 1.14 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
language: android
android:
components:
- tools
- platform-tools
- build-tools-21.1.2
- android-21
- extra-android-support
- extra-android-m2repository
env:
global:
- TERM=dumb
before_script:
- export DATE=$(date)
- export VERSION=$(date --date="$DATE" +'%Y%m%d%H%M%S')
script:
- sed -i -r -e "s/(android:versionCode=\")[0-9]+(\")/\1$VERSION\2/g"
-e "s/(android:versionName=\"[0-9.]+)(\")/\1-dev-$VERSION\2/g"
AndroidManifest.xml
- mv src/me/sheimi/sgit src/me/sheimi/sgit_dev
- find . -type f -exec sed -i "s/me\.sheimi\.sgit/me\.sheimi\.sgit_dev/g" '{}' \;
- find res -type f -exec sed -i -r 's/(<string name="app_name">SGit)(<\/string>)/\1 Dev\2/g' '{}' \;
- chmod +x ./gradlew
- ./gradlew build connectedCheck
- 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"