aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-10-01 11:16:57 +0200
committerManolo Carrasco <manolo@apache.org>2015-10-01 11:16:57 +0200
commit60e7b3c0273e7b332c3bcab84636f5be1b823089 (patch)
tree5b74e013cc060ecb7691fc5a5f9679981cb29147
parent3d3811ffa554863c3b68b2f8dcb12d3c995afd8a (diff)
downloadvaadin-core-60e7b3c0273e7b332c3bcab84636f5be1b823089.tar.gz
vaadin-core-60e7b3c0273e7b332c3bcab84636f5be1b823089.zip
Remove _components root folder in zip file. Added clean
-rw-r--r--tasks/docsite.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/tasks/docsite.js b/tasks/docsite.js
index c31683c..decede9 100644
--- a/tasks/docsite.js
+++ b/tasks/docsite.js
@@ -17,6 +17,14 @@ var host = config.cdnHost;
var permalink = config.permalink;
var stagingPath = stagingBasePath + '/' + version;
var modify = require('gulp-modify');
+var rootZip = 'target/';
+var fileZip = 'docsite.zip'
+
+
+gulp.task('cdn:docsite:clean', function() {
+ fs.removeSync(docPath);
+ fs.removeSync(rootZip + fileZip);
+});
gulp.task('cdn:docsite:bower_components', ['cdn:stage-bower_components'], function() {
gutil.log('Copying bower components from ' + stagingPath + ' to ' + docPath + '/bower_components');
@@ -66,23 +74,19 @@ config.components.forEach(function (n) {
});
gulp.task('cdn:docsite:zip', doctasks, function() {
- var src = docPath + '/../**/*';
- var root = 'target';
- var file = 'docsite.zip';
- gutil.log("Creating docsite zip " + docPath + " -> " + root + '/' + file);
+ var src = docPath + '/**/*';
+ gutil.log("Creating docsite zip " + docPath + " -> " + rootZip + fileZip);
return gulp.src(src)
- .pipe(zip(file))
- .pipe(gulp.dest(root));
+ .pipe(zip(fileZip))
+ .pipe(gulp.dest(rootZip));
});
-gulp.task('cdn:docsite:upload', ['cdn:docsite:zip'], function(done) {
+gulp.task('cdn:docsite:upload', ['cdn:docsite:clean', 'cdn:docsite:zip'], function(done) {
common.checkArguments(['cdnUsername', 'cdnDestination']);
- var root = 'target';
- var file = 'docsite.zip';
- gutil.log('Uploading docsite (scp): ' + root + '/' + file + ' -> ' + args.cdnUsername + '@' + host + ':' + args.cdnDestination + version);
+ gutil.log('Uploading docsite (scp): ' + rootZip + fileZip + ' -> ' + args.cdnUsername + '@' + host + ':' + args.cdnDestination + version);
- require('scp2').scp(root + '/' + file, {
+ require('scp2').scp(rootZip + fileZip, {
host: host,
username: args.cdnUsername,
privateKey: config.paths.privateKey(),