MOBILE-3708 travis: Add Android build
parent
43cc4f0573
commit
8c24136761
51
.travis.yml
51
.travis.yml
|
@ -1,7 +1,48 @@
|
|||
language: node_js
|
||||
os: linux
|
||||
dist: trusty
|
||||
language: android
|
||||
node_js: 12
|
||||
cache: npm
|
||||
|
||||
if: env(DEPLOY) = 1
|
||||
|
||||
git:
|
||||
depth: 3
|
||||
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- platform-tools
|
||||
- build-tools-29.0.3
|
||||
- android-28
|
||||
- extra-google-google_play_services
|
||||
- extra-google-m2repository
|
||||
- extra-android-m2repository
|
||||
|
||||
before_cache:
|
||||
- rm -rf $HOME/.cache/electron-builder/wine
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
|
||||
cache:
|
||||
npm: true
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
- $HOME/.cache/electron
|
||||
- $HOME/.cache/electron-builder
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.android/build-cache
|
||||
|
||||
before_install:
|
||||
- nvm install 12
|
||||
- node --version
|
||||
- npm --version
|
||||
- nvm --version
|
||||
- npm ci
|
||||
- npm install npm@^6 gulp -g
|
||||
|
||||
before_script:
|
||||
- gulp
|
||||
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run test:ci
|
||||
- npm run build:prod
|
||||
- scripts/build.sh
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
source "scripts/functions.sh"
|
||||
|
||||
if [ -z $GIT_TOKEN ]; then
|
||||
print_error "Env vars not correctly defined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_title "Run scripts"
|
||||
# TODO Change branch name.
|
||||
git clone --depth 1 --single-branch --branch ionic5 https://$GIT_TOKEN@github.com/moodlemobile/apps-scripts.git ../scripts
|
||||
cp ../scripts/*.sh scripts/
|
||||
|
||||
if [ ! -f scripts/platform.sh ]; then
|
||||
print_error "Platform file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_title 'Platform Build'
|
||||
./scripts/platform.sh
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
|
@ -25,7 +25,7 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
|
|||
define('MOODLE_INTERNAL', 1);
|
||||
define('LANGPACKSFOLDER', '../../moodle-langpacks');
|
||||
define('ASSETSPATH', '../src/assets/lang/');
|
||||
define('CONFIG', '../config/config.json');
|
||||
define('CONFIG', '../moodle.config.json');
|
||||
define('OVERRIDE_LANG_SUFIX', false);
|
||||
|
||||
global $strings;
|
||||
|
|
Loading…
Reference in New Issue