aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/zip.js
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2016-05-30 14:26:07 +0300
committerTeemu Pòˆntelin <teemu@vaadin.com>2016-06-02 14:22:23 +0300
commit0167fb458441a4465c4850e9b945632101d2afd6 (patch)
tree5cda05804479087816d40d54816a39eb931d95e0 /tasks/zip.js
parent2cf54d65c19c50f50028b906b89d89d28c043b22 (diff)
downloadvaadin-core-1.0.tar.gz
vaadin-core-1.0.zip
Add "zip" Gulp task to create the zip package for a release1.0
Diffstat (limited to 'tasks/zip.js')
-rw-r--r--tasks/zip.js19
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));
+});