ci: when testing with ng4 add ng4 to all ng new calls (#4974)

There was a missing one for routing.
This commit is contained in:
Hans 2017-02-23 18:37:19 -08:00 committed by GitHub
parent a537dce3a9
commit 84e67cece2

View File

@ -32,9 +32,11 @@ export function ngServe(...args: string[]) {
export function createProject(name: string, ...args: string[]) {
const argv: any = getGlobalVariable('argv');
return Promise.resolve()
.then(() => process.chdir(getGlobalVariable('tmp-root')))
.then(() => ng('new', name, '--skip-install', ...args))
.then(() => ng('new', name, '--skip-install', ...(argv['ng4'] ? ['--ng4'] : []), ...args))
.then(() => process.chdir(name))
.then(() => updateJsonFile('package.json', json => {
Object.keys(packages).forEach(pkgName => {
@ -42,7 +44,6 @@ export function createProject(name: string, ...args: string[]) {
});
}))
.then(() => {
const argv: any = getGlobalVariable('argv');
if (argv.nightly || argv['ng-sha']) {
const label = argv['ng-sha'] ? `#2.0.0-${argv['ng-sha']}` : '';
return updateJsonFile('package.json', json => {