This repository was archived by the owner on Apr 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ module.exports = function(options) {
83
83
}
84
84
} ) ;
85
85
if ( ! found ) {
86
- return callback ( new gutil . PluginError ( 'gulp-deploy-git' , 'branch ' + branch + ' is not configured to deploy' ) ) ;
86
+ return callback ( 'doNotDeployBranch' ) ;
87
87
}
88
88
callback ( null ) ;
89
89
}
@@ -191,8 +191,7 @@ module.exports = function(options) {
191
191
} ) ;
192
192
cmdCommit . on ( 'exit' , function ( code ) {
193
193
if ( code === 1 ) {
194
- gutil . log ( gutil . colors . magenta ( 'No changes to deployment files, skipping' ) ) ;
195
- return callback ( null ) ;
194
+ return callback ( 'noChanges' ) ;
196
195
}
197
196
if ( code !== 0 ) {
198
197
return callback ( new gutil . PluginError ( 'gulp-deploy-git' , 'git commit exited with code ' + code ) ) ;
@@ -227,7 +226,16 @@ module.exports = function(options) {
227
226
}
228
227
] , function ( err ) {
229
228
if ( err ) {
230
- self . emit ( 'error' , err ) ;
229
+ switch ( err ) {
230
+ case 'doNotDeployBranch' :
231
+ gutil . log ( gutil . colors . magenta ( 'Branch ' + branch + ' not configured to deploy, skipping' ) ) ;
232
+ break ;
233
+ case 'noChanges' :
234
+ gutil . log ( gutil . colors . magenta ( 'No changes to deployment files, skipping' ) ) ;
235
+ break ;
236
+ default :
237
+ self . emit ( 'error' , err ) ;
238
+ }
231
239
}
232
240
done ( err ) ;
233
241
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gulp-deploy-git" ,
3
- "version" : " 0.4.1 " ,
3
+ "version" : " 0.4.2 " ,
4
4
"description" : " Deploy Git projects to remote Git repositories." ,
5
5
"author" :
" Thomas Lokshall <[email protected] >" ,
6
6
"license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments