aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-01-30 14:57:14 +0000
committerSam Potts <sam@potts.es>2020-01-30 14:57:14 +0000
commit8b9521d5a5d34bf81c57e901286ac325da2c1fc0 (patch)
treefe8e62a884347ffbe8caffddb68bb390b75854a2 /gulpfile.js
parent818e1efd430ff5bd21bbb85fde0b3f31e14a9ab2 (diff)
downloadplyr-8b9521d5a5d34bf81c57e901286ac325da2c1fc0.tar.lz
plyr-8b9521d5a5d34bf81c57e901286ac325da2c1fc0.tar.xz
plyr-8b9521d5a5d34bf81c57e901286ac325da2c1fc0.zip
Fix beta deployment
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 9ff654b7..66966617 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -294,7 +294,7 @@ const options = {
},
},
demo: {
- uploadPath: branch.current === branch.beta ? 'beta' : null,
+ uploadPath: branch.current === branch.beta ? '/beta' : null,
headers: {
'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0',
},
@@ -461,6 +461,14 @@ gulp.task('demo', done => {
return gulp
.src(pages)
.pipe(replace(localPath, versionPath))
+ .pipe(
+ rename(p => {
+ if (options.demo.uploadPath) {
+ // eslint-disable-next-line no-param-reassign
+ p.dirname += options.demo.uploadPath;
+ }
+ }),
+ )
.pipe(publisher.publish(options.demo.headers))
.pipe(publish.reporter());
});