aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manolo@apache.org>2016-06-02 08:59:41 +0300
committerManuel Carrasco Moñino <manolo@apache.org>2016-06-02 08:59:41 +0300
commit6eb91bc45c65630ccd9c51dc9cdca7c8c278a07b (patch)
treea93c425ee5317d8f5983e20df1b59047605ef5ae
parentefab1e9fb26170cca40092af2d67ade23411dcd1 (diff)
parente52f072328b4c77e87b7831c407401073cf9c9ee (diff)
downloadvaadin-core-6eb91bc45c65630ccd9c51dc9cdca7c8c278a07b.tar.gz
vaadin-core-6eb91bc45c65630ccd9c51dc9cdca7c8c278a07b.zip
Merge pull request #51 from vaadin/restore-zip
Restore ZIP related steps
-rw-r--r--gulpfile.js4
-rw-r--r--tasks/config.js1
-rw-r--r--tasks/zip.js19
3 files changed, 22 insertions, 2 deletions
diff --git a/gulpfile.js b/gulpfile.js
index eb04af8..9f60d08 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -7,9 +7,9 @@ var git = require('gulp-git');
var version = '0.3.0';
gulp.task('default', function() {
- console.log('\n Use:\n gulp <stage|deploy[:cdn]>\n');
+ console.log('\n Use:\n gulp <stage|deploy[:cdn]>|<zip>\n');
});
-gulp.task('clean', ['clean:cdn']);
+gulp.task('clean', ['clean:cdn', 'clean:zip']);
gulp.task('deploy', ['deploy:cdn']);
diff --git a/tasks/config.js b/tasks/config.js
index 3034ab8..61d550f 100644
--- a/tasks/config.js
+++ b/tasks/config.js
@@ -12,6 +12,7 @@ module.exports = {
staging: {
bower: 'target/bower',
cdn: 'target/cdn',
+ zip: 'target/zip',
doc: 'target/docsite'
},
userhome: userhome,
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));
+});