1
- const gulp = require ( 'gulp' ) ;
1
+ /* eslint-disable */
2
+ const gulp = require ( 'gulp' ) ;
2
3
const sri = require ( 'gulp-sri' ) ;
3
4
const git = require ( 'git-rev-sync' ) ;
4
5
const pkg = require ( './package.json' ) ;
@@ -13,15 +14,16 @@ const pkgCurrentVersion = pkg.version;
13
14
14
15
const source = [ 'dist/*.js' , 'dist/*.js.map' , 'dist/*.css' , 'dist/*.json' ] ; // source for deploy
15
16
const sourceSRI = [ 'dist/*.js' , 'dist/*.css' ] ; // source for sri generation
16
- const bucket = process . env . DEPLOY_BUCKET || 'static.filestackapi.com' // upload bucked
17
+ const bucket = process . env . DEPLOY_BUCKET || 'static.filestackapi.com' ; // upload bucked
17
18
const betaBranch = process . env . BETA_BRANCH || 'develop' ;
18
19
const dryRun = process . env . DRY_RUN || false ;
19
20
20
21
const putObjectParams = {
21
22
ACL : 'public-read'
22
23
} ;
23
24
const deployPath = pkgName ; // upload path
24
- const cacheControl = { // cache controll for each version
25
+ // cache controll for each version
26
+ const cacheControl = {
25
27
latest : 1 ,
26
28
version : 30 ,
27
29
beta : 0 ,
@@ -69,10 +71,10 @@ const uploadFile = (version, CacheControl) => {
69
71
CacheControl : `max-age=${ CacheControl * 86400 } ` ,
70
72
} ,
71
73
uploadPath : `${ deployPath } /${ version } ` ,
72
- dryRun,
74
+ dryRun
73
75
} ;
74
76
75
- console . info ( 'Upload files with option:' , options )
77
+ console . info ( 'Upload files with option:' , options ) ;
76
78
77
79
return upload ( S3Client , options ) ;
78
80
}
@@ -139,7 +141,7 @@ gulp.task('publish:beta', (done) => {
139
141
return done ( ) ;
140
142
}
141
143
142
- return gulp . src ( source ) . pipe ( uploadFile ( 'beta' , cacheControl . beta ) )
144
+ return gulp . src ( source ) . pipe ( uploadFile ( 'beta' , cacheControl . beta ) ) ;
143
145
} ) ;
144
146
145
147
gulp . task ( 'publish:latest' , async ( ) => {
0 commit comments