-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (53 loc) · 2.96 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: android
android:
components:
- platform-tools
- build-tools
- android-19
- android-22
- android-23
sudo: false
cache:
directories:
- keys
- node_modules
- bower_components
before_install:
- openssl aes-256-cbc -k "$encrypted_key" -iv "$encrypted_iv" -in sofia-release-key.keystore.enc -out sofia-release-key.keystore -d
- nvm install 5.1 && nvm alias default 5.1 && nvm use 5.1
- npm install --quiet -g npm gulp cordova snyk
- snyk auth $SNYK_KEY
before_script:
- npm install --quiet
- snyk test || echo "Some librarie(s) need fix"
- sed -i '/android {/a lintOptions { abortOnError false } ' platforms/android/build.gradle
script:
- find ./www -type f -name '*.less' -delete
- find ./www -type f -name '*.map' -delete
- find ./www/assets -type f -name '*.js' -delete
- rm -Rf www/assets/js www/assets/less www/assets/platform/android/less www/assets/platform/browser
- cordova build android --release
- git clone https://github.com/adentes-org/SOFIA.git webapp && (cd webapp && git checkout gh-pages && chmod +x ./scripts/*.sh && ./scripts/build.sh && ./scripts/deploy.sh && ls -lah)
after_success:
- export PATH=$(find /usr/local/android-sdk/ -name zipalign -type f| head -1 | sed -e 's/\/zipalign//g'):$PATH
- export KEYSTORE=$(pwd)/sofia-release-key.keystore
- sed -i.bak s/01\"/02\"/g config.xml #Fix last digit of android build for specfic hardware
- cordova plugin add cordova-plugin-crosswalk-webview && cordova build android --release
- ls platforms/android/build/outputs/apk/
- APK=platforms/android/build/outputs/apk/android-release npm run sign
- APK=platforms/android/build/outputs/apk/android-armv7-release npm run sign
- APK=platforms/android/build/outputs/apk/android-x86-release npm run sign
- rm -Rf webapp/scripts webapp/.travis.yml webapp/.gitignore webapp/.git && ls webapp && zip -r webapp.zip webapp/ && ls -lah
- md5sum platforms/android/build/outputs/apk/*.apk && sha512sum platforms/android/build/outputs/apk/*.apk webapp.zip
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: REgeIaHbBjMektIqH+sdlmdqtz9KCn5wUcPtamMvquwFUn676VtBqTwYAPUsrq46FojKM1t3unXjSdp1rwslijX0Q9NTZW0FOnkbfmUB4PwveSTFcr1oBd0h+APfYnSiw62RHW6+JjGrK0jNQLQAA35PTows4FKW8mIyzzDWFT+LklHoQ4NP3NNp2hqXmMbcsVkQtEdHhN2a+Kh3zFEnCzDeoQN7BqhJmHIeKR23cK0I9P4wAyJjPkvcFtb32D93TyN3ysBS6l4LNeYI5aAGdf5KKJez66Hipo3L3A03BTsIfMxSlPrhmw3REWje9xFxDUCvyH4E7WxjMo1oICJQ+N6VEUTHSb0OMMByTxz+3gxf9slydR5d23Uy4c6XFGBB6DLwa97cRgs7wM/k0XgfK7lwQg+20fs4IoesGp+6TqpfR9M4IgYjX2XEg2A5bF62dKJjVWWeCAQtWqRlgStKNpUSI27s786mHRQZdlPf2rJ8uyd5zUbhjJ2wCRJX08nVff4TGKDJJvLjvu+/nni4NjGrft1sxgBQIe29zPlJ7CTh29qRLNTbis/Uodi76YaQQV352/R9sowRIkKFGH34grvXgtiKbTPuvkhcN4XfUu7Dm+QCoS5C5u0etHUIo3hqRhq0po1HmIqkT7c6QGERKVFbpT5OwynYjzHYKmmrECc=
file:
- "webapp.zip"
- "platforms/android/build/outputs/apk/android-release-signed-aligned.apk"
- "platforms/android/build/outputs/apk/android-armv7-release-signed-aligned.apk"
- "platforms/android/build/outputs/apk/android-x86-release-signed-aligned.apk"
on:
tags: true