commit
4acedf95c1
52
.travis.yml
52
.travis.yml
|
@ -19,43 +19,35 @@ git:
|
||||||
depth: 3
|
depth: 3
|
||||||
|
|
||||||
before_cache:
|
before_cache:
|
||||||
- rm -rf $HOME/.cache/electron-builder/wine
|
|
||||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.npm
|
- $HOME/.npm
|
||||||
- $HOME/.cache/electron
|
|
||||||
- $HOME/.cache/electron-builder
|
|
||||||
- $HOME/.gradle/caches/
|
- $HOME/.gradle/caches/
|
||||||
- $HOME/.gradle/wrapper/
|
- $HOME/.gradle/wrapper/
|
||||||
- $HOME/.android/build-cache
|
- $HOME/.android/build-cache
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- if [ "$TRAVIS_OS_NAME" != 'windows' ] ; then npm install npm@latest -g ; fi
|
- npm install npm@latest -g
|
||||||
- gulp
|
- gulp
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: check
|
- stage: check
|
||||||
if: NOT branch =~ /(master|integration|desktop)$/ AND env(DEPLOY) IS blank
|
if: NOT branch =~ /(master|integration|desktop)$/ AND env(DEPLOY) IS blank
|
||||||
os: linux
|
|
||||||
script: npm run build --bailOnLintError true --typeCheckOnLint true
|
script: npm run build --bailOnLintError true --typeCheckOnLint true
|
||||||
- stage: mirror
|
- stage: mirror
|
||||||
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
|
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
|
||||||
os: linux
|
|
||||||
script: scripts/mirror.sh
|
script: scripts/mirror.sh
|
||||||
- stage: prepare
|
- stage: prepare
|
||||||
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS NOT blank AND env(PREPARE) = 1 AND type != cron
|
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS present AND env(PREPARE) = 1 AND type != cron AND tag IS blank
|
||||||
os: linux
|
|
||||||
script: scripts/aot.sh
|
script: scripts/aot.sh
|
||||||
- stage: build
|
- stage: build
|
||||||
name: "Build Android"
|
name: "Build Android"
|
||||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch != desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
|
if: env(DEPLOY) IS present AND type != cron AND ((env(DEPLOY) = 1 AND tag IS blank) OR (env(DEPLOY) = 2 AND tag IS present))
|
||||||
os: linux
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
group: edge
|
|
||||||
language: android
|
language: android
|
||||||
env:
|
env:
|
||||||
- BUILD_PLATFORM='android'
|
- BUILD_PLATFORM='android'
|
||||||
|
@ -67,44 +59,6 @@ jobs:
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm install -g gulp
|
- npm install -g gulp
|
||||||
script: scripts/aot.sh
|
script: scripts/aot.sh
|
||||||
- stage: build
|
|
||||||
name: "Build iOS"
|
|
||||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch != desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode12.2
|
|
||||||
env:
|
|
||||||
- BUILD_PLATFORM='ios'
|
|
||||||
script: scripts/aot.sh
|
|
||||||
- stage: build
|
|
||||||
name: "Build Linux"
|
|
||||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
|
||||||
os: linux
|
|
||||||
env:
|
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
||||||
- BUILD_PLATFORM='linux'
|
|
||||||
script: scripts/aot.sh
|
|
||||||
- stage: build
|
|
||||||
name: "Build MacOS"
|
|
||||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode12.2
|
|
||||||
env:
|
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
||||||
- BUILD_PLATFORM='osx'
|
|
||||||
script: scripts/aot.sh
|
|
||||||
- stage: build
|
|
||||||
name: "Build Windows"
|
|
||||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
|
||||||
os: windows
|
|
||||||
env:
|
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
||||||
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
|
|
||||||
- DEBUG=electron-windows-store
|
|
||||||
- BUILD_PLATFORM='windows'
|
|
||||||
script: scripts/aot.sh
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: "End to end tests (mod_forum, mod_messages and mod_comments)"
|
name: "End to end tests (mod_forum, mod_messages and mod_comments)"
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -400,6 +400,9 @@ function override_component_lang_files($keys, $translations) {
|
||||||
case 'assets':
|
case 'assets':
|
||||||
$path .= $type.'/'.$component;
|
$path .= $type.'/'.$component;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
$path .= $type.'/lang';
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import { CoreCourseProvider } from './course';
|
||||||
import { CoreCourseOfflineProvider } from './course-offline';
|
import { CoreCourseOfflineProvider } from './course-offline';
|
||||||
import { CoreCourseModuleDelegate } from './module-delegate';
|
import { CoreCourseModuleDelegate } from './module-delegate';
|
||||||
import { CoreCourseModulePrefetchDelegate } from './module-prefetch-delegate';
|
import { CoreCourseModulePrefetchDelegate } from './module-prefetch-delegate';
|
||||||
import { CoreLoginHelperProvider } from '@core/login/providers/helper';
|
import { CoreLoginHelper, CoreLoginHelperProvider } from '@core/login/providers/helper';
|
||||||
import { CoreConstants } from '@core/constants';
|
import { CoreConstants } from '@core/constants';
|
||||||
import { CoreSite } from '@classes/site';
|
import { CoreSite } from '@classes/site';
|
||||||
import { CoreLoggerProvider } from '@providers/logger';
|
import { CoreLoggerProvider } from '@providers/logger';
|
||||||
|
@ -122,7 +122,6 @@ export class CoreCourseHelperProvider {
|
||||||
private timeUtils: CoreTimeUtilsProvider,
|
private timeUtils: CoreTimeUtilsProvider,
|
||||||
private utils: CoreUtilsProvider,
|
private utils: CoreUtilsProvider,
|
||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
private loginHelper: CoreLoginHelperProvider,
|
|
||||||
private courseOptionsDelegate: CoreCourseOptionsDelegate,
|
private courseOptionsDelegate: CoreCourseOptionsDelegate,
|
||||||
private siteHomeProvider: CoreSiteHomeProvider,
|
private siteHomeProvider: CoreSiteHomeProvider,
|
||||||
private eventsProvider: CoreEventsProvider,
|
private eventsProvider: CoreEventsProvider,
|
||||||
|
@ -1302,7 +1301,7 @@ export class CoreCourseHelperProvider {
|
||||||
if (courseId == site.getSiteHomeId()) {
|
if (courseId == site.getSiteHomeId()) {
|
||||||
// Check if site home is available.
|
// Check if site home is available.
|
||||||
return this.siteHomeProvider.isAvailable().then(() => {
|
return this.siteHomeProvider.isAvailable().then(() => {
|
||||||
this.loginHelper.redirect('CoreSiteHomeIndexPage', params, siteId);
|
CoreLoginHelper.instance.redirect('CoreSiteHomeIndexPage', params, siteId);
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
modal.dismiss();
|
modal.dismiss();
|
||||||
});
|
});
|
||||||
|
@ -1610,7 +1609,7 @@ export class CoreCourseHelperProvider {
|
||||||
params = params || {};
|
params = params || {};
|
||||||
Object.assign(params, { course: course });
|
Object.assign(params, { course: course });
|
||||||
|
|
||||||
return this.loginHelper.redirect(CoreLoginHelperProvider.OPEN_COURSE, params, siteId);
|
return CoreLoginHelper.instance.redirect(CoreLoginHelperProvider.OPEN_COURSE, params, siteId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ import { CoreConstants } from '@core/constants';
|
||||||
import { Md5 } from 'ts-md5/dist/md5';
|
import { Md5 } from 'ts-md5/dist/md5';
|
||||||
import { CoreSite } from '@classes/site';
|
import { CoreSite } from '@classes/site';
|
||||||
import { CoreUrl } from '@singletons/url';
|
import { CoreUrl } from '@singletons/url';
|
||||||
|
import { makeSingleton } from '@singletons/core.singletons';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data related to a SSO authentication.
|
* Data related to a SSO authentication.
|
||||||
|
@ -1417,3 +1418,5 @@ export class CoreLoginHelperProvider {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class CoreLoginHelper extends makeSingleton(CoreLoginHelperProvider) {}
|
||||||
|
|
Loading…
Reference in New Issue