@@ -44,22 +44,26 @@ module.exports = DeployPlugin.extend({
44
44
const tempPath = paths . tempPath ;
45
45
46
46
return RSVP . resolve ( )
47
- . then ( ( ) => this . log ( `1/5. Cloning skeleton FastBoot server` ) )
47
+ . then ( ( ) => this . log ( `1/6. Cleaning up any existing temp files` ) )
48
+ . then ( ( ) => fs . remove ( tempPath ) )
49
+ . then ( ( ) => fs . remove ( `${ tempPath } .zip` ) )
50
+
51
+ . then ( ( ) => this . log ( `2/6. Cloning skeleton FastBoot server` ) )
48
52
. then ( ( ) => fs . copy ( skeletonPath , tempPath ) )
49
53
50
- . then ( ( ) => this . log ( `2/5 . Installing FastBoot server dependencies` ) )
54
+ . then ( ( ) => this . log ( `3/6 . Installing FastBoot server dependencies` ) )
51
55
. then ( ( ) => exec ( "npm install --production" , { cwd : tempPath } ) )
52
56
53
- . then ( ( ) => this . log ( `3/5 . Cloning config into FastBoot server directory` ) )
57
+ . then ( ( ) => this . log ( `4/6 . Cloning config into FastBoot server directory` ) )
54
58
. then ( ( ) => {
55
59
const json = JSON . stringify ( config ) ;
56
60
return fs . writeFile ( `${ tempPath } /config.json` , json , 'utf8' ) ;
57
61
} )
58
62
59
- . then ( ( ) => this . log ( `4/5 . Cloning FastBoot build into FastBoot server directory` ) )
63
+ . then ( ( ) => this . log ( `5/6 . Cloning FastBoot build into FastBoot server directory` ) )
60
64
. then ( ( ) => fs . copy ( context . distDir , `${ tempPath } /dist` ) )
61
65
62
- . then ( ( ) => this . log ( `5/5 . Installing dependencies of the FastBoot build` ) )
66
+ . then ( ( ) => this . log ( `6/6 . Installing dependencies of the FastBoot build` ) )
63
67
. then ( ( ) => exec ( 'npm install --production' , { cwd : `${ tempPath } /dist` } ) )
64
68
65
69
. then ( ( ) => this . log ( `API FastBoot lambda production bundle successfully built` ) ) ;
@@ -91,6 +95,6 @@ module.exports = DeployPlugin.extend({
91
95
} ) ;
92
96
} )
93
97
94
- . then ( ( ) => this . log ( `API FastBoot lambda production bundle successfully uploaded to "${ lambdaFunction } " lambda function to region "${ region } " 🚀` ) ) ;
98
+ . then ( ( ) => this . log ( `API FastBoot lambda production bundle successfully uploaded to "${ lambdaFunction } " lambda in region "${ region } " 🚀` ) ) ;
95
99
}
96
100
} ) ;
0 commit comments