Skip to content

Commit 3f000e9

Browse files
committed
Improved upload task.
1 parent a0f3872 commit 3f000e9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gulpfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function concatGenerator(sources, file) {
7272
}
7373
}
7474

75-
function uploadCDN(file, version) {
75+
function uploadCDN(file, version, cb) {
7676
qiniu.conf.ACCESS_KEY = process.env['CDN_QINIU_KEY'];
7777
qiniu.conf.SECRET_KEY = process.env['CDN_QINIU_SECRET'];
7878
var bucketname = 'paas_files';
@@ -90,6 +90,7 @@ function uploadCDN(file, version) {
9090
} else {
9191
console.log(err);
9292
}
93+
cb();
9394
});
9495
}
9596

@@ -155,9 +156,10 @@ gulp.task('clean', function() {
155156
.pipe(clean({force: true}));
156157
});
157158

158-
gulp.task('upload', function() {
159-
uploadCDN('./dist/av-mini.js', getAVVersion());
160-
uploadCDN('./dist/av-core-mini.js', getAVVersion());
159+
gulp.task('upload', function(cb) {
160+
uploadCDN('./dist/av-mini.js', getAVVersion(), function(){
161+
uploadCDN('./dist/av-core-mini.js', getAVVersion(), cb);
162+
});
161163
});
162164

163165

0 commit comments

Comments
 (0)