diff --git a/src/schematics/deploy/actions.jasmine.ts b/src/schematics/deploy/actions.jasmine.ts index c723f07ab..ebf04fd34 100644 --- a/src/schematics/deploy/actions.jasmine.ts +++ b/src/schematics/deploy/actions.jasmine.ts @@ -116,6 +116,8 @@ describe('Deploy Angular apps', () => { expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalledWith({ cwd: 'cwd', + token: undefined, + force: true, only: 'hosting:' + PROJECT }); }); diff --git a/src/schematics/deploy/actions.ts b/src/schematics/deploy/actions.ts index 0a7bab9bf..12cdceb3a 100644 --- a/src/schematics/deploy/actions.ts +++ b/src/schematics/deploy/actions.ts @@ -42,6 +42,8 @@ const deployToHosting = ( return firebaseTools.deploy({ // tslint:disable-next-line:no-non-null-assertion only: 'hosting:' + context.target!.project, + token: process.env.FIREBASE_TOKEN, + force: true, cwd: workspaceRoot }); } else { @@ -54,6 +56,8 @@ const deployToHosting = ( return firebaseTools.deploy({ // tslint:disable-next-line:no-non-null-assertion only: 'hosting:' + context.target!.project, + token: process.env.FIREBASE_TOKEN, + force: true, cwd: workspaceRoot }); @@ -194,6 +198,8 @@ export const deployToFunction = async ( return firebaseTools.deploy({ // tslint:disable-next-line:no-non-null-assertion only: `hosting:${context.target!.project},functions:ssr`, + token: process.env.FIREBASE_TOKEN, + force: true, cwd: workspaceRoot }); } else { @@ -204,6 +210,8 @@ export const deployToFunction = async ( return firebaseTools.deploy({ // tslint:disable-next-line:no-non-null-assertion only: `hosting:${context.target!.project},functions:ssr`, + token: process.env.FIREBASE_TOKEN, + force: true, cwd: workspaceRoot }); } diff --git a/src/schematics/interfaces.ts b/src/schematics/interfaces.ts index f3d2eda83..8f9dfcd22 100644 --- a/src/schematics/interfaces.ts +++ b/src/schematics/interfaces.ts @@ -8,6 +8,8 @@ export interface Project { export interface FirebaseDeployConfig { cwd: string; + token?: string; + force: boolean; only?: string; }