File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,38 @@ class ServerlessPythonRequirements {
70
70
this . serverless = serverless ;
71
71
this . options = options ;
72
72
73
+ this . commands = {
74
+ 'requirements' : {
75
+ commands : {
76
+ 'clean' : {
77
+ usage : 'Remove .requirements and requirements.py' ,
78
+ lifecycleEvents : [
79
+ 'clean' ,
80
+ ] ,
81
+ } ,
82
+ } ,
83
+ commands : {
84
+ 'install' : {
85
+ usage : 'install requirements manually' ,
86
+ lifecycleEvents : [
87
+ 'install' ,
88
+ ] ,
89
+ } ,
90
+ } ,
91
+ } ,
92
+ } ;
93
+
73
94
this . hooks = {
74
95
'before:deploy:createDeploymentArtifacts' : ( ) => BbPromise . bind ( this )
75
96
. then ( this . packVendorHelper )
76
97
. then ( this . packRequirements ) ,
77
98
78
- 'after:deploy:createDeploymentArtifacts' : ( ) => BbPromise . bind ( this )
79
- . then ( this . cleanup ) ,
99
+ 'requirements:install:install' : ( ) => BbPromise . bind ( this )
100
+ . then ( this . packVendorHelper )
101
+ . then ( this . packRequirements ) ,
102
+
103
+ 'requirements:clean:clean' : ( ) => BbPromise . bind ( this )
104
+ . then ( this . cleanup )
80
105
} ;
81
106
}
82
107
}
You can’t perform that action at this time.
0 commit comments