diff options
author | Teemu Pòˆntelin <teemu@vaadin.com> | 2016-05-30 14:26:07 +0300 |
---|---|---|
committer | Teemu Pòˆntelin <teemu@vaadin.com> | 2016-05-31 09:25:13 +0300 |
commit | e52f072328b4c77e87b7831c407401073cf9c9ee (patch) | |
tree | a93c425ee5317d8f5983e20df1b59047605ef5ae /tasks/zip.js | |
parent | efab1e9fb26170cca40092af2d67ade23411dcd1 (diff) | |
download | vaadin-core-e52f072328b4c77e87b7831c407401073cf9c9ee.tar.gz vaadin-core-e52f072328b4c77e87b7831c407401073cf9c9ee.zip |
Add "zip" Gulp task to create the zip package for a release
Diffstat (limited to 'tasks/zip.js')
-rw-r--r-- | tasks/zip.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tasks/zip.js b/tasks/zip.js new file mode 100644 index 0000000..cc469eb --- /dev/null +++ b/tasks/zip.js @@ -0,0 +1,19 @@ +var config = require('./config'); +var fs = require('fs-extra'); +var gulp = require('gulp'); +var zip = require('gulp-zip'); + +var stagingPath = config.paths.staging.zip; +var version = config.version; +var filename = 'vaadin-core-elements-' + version + '.zip'; +var majorMinorVersion = version.replace(/(\d+\.\d+)(\.|-)(.*)/, '$1'); + +gulp.task('clean:zip', function() { + fs.removeSync(stagingPath); +}); + +gulp.task('zip', ['clean:zip', 'stage:cdn'], function() { + return gulp.src(config.paths.staging.cdn + '/' + version + '/**/*') + .pipe(zip(filename)) + .pipe(gulp.dest(stagingPath)); +}); |