File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ program
3535program
3636 . command ( 'deploy' )
3737 . description ( 'deploy business logic to production' )
38+ . option ( '--keep-zip' , 'Keep generated zip file after deploying' )
3839 . action ( deploy ) ;
3940
4041program
@@ -88,7 +89,11 @@ function cloud() {
8889
8990function deploy ( ) {
9091 buildOptions ( true )
91- . then ( CodeRunner . deploy )
92+ . then ( ( opts ) => {
93+ opts . keepZip = this . keepZip ;
94+
95+ return CodeRunner . deploy ( opts ) ;
96+ } )
9297 . catch ( showError ) ;
9398}
9499
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ exports.publish = function(opts) {
1515 const zipped = generateZip ( model , opts . app . files . concat ( dependencyPatterns ( ) ) ) ;
1616 const scs = new ServerCodeService ( opts . app , opts . backendless . apiServer ) ;
1717
18+ if ( opts . keepZip ) {
19+ fs . writeFile ( 'deploy.zip' , zipped ) ;
20+ logger . info ( `Deployment archive is saved to ${ path . resolve ( 'deploy.zip' ) } ` ) ;
21+ }
22+
1823 Promise . resolve ( )
1924 . then ( ( ) => scs . registerRunner ( ) ) // http://bugs.backendless.com/browse/BKNDLSS-11655
2025 . then ( ( ) => scs . registerModel ( model ) )
You can’t perform that action at this time.
0 commit comments