summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-11-26 14:57:10 +0200
committerSauli Tähkäpää <sauli@vaadin.com>2015-12-03 14:07:44 +0200
commitb84c43405341ecfe9b666d9acae233ca7bf7efef (patch)
treed5ac789783364519456cad47550e44534979f549 /tasks
parent520c925e10bceb088e16dc06a8abcca0e719f3d6 (diff)
downloadvaadin-core-b84c43405341ecfe9b666d9acae233ca7bf7efef.tar.gz
vaadin-core-b84c43405341ecfe9b666d9acae233ca7bf7efef.zip
Remove unused zip deployment scripts.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/zip.js75
1 files changed, 2 insertions, 73 deletions
diff --git a/tasks/zip.js b/tasks/zip.js
index ddd9a73..43b21f3 100644
--- a/tasks/zip.js
+++ b/tasks/zip.js
@@ -1,14 +1,9 @@
-var _ = require('lodash');
var args = require('yargs').argv;
-var bower = require('gulp-bower');
var common = require('./common');
var config = require('./config');
-var download = require('gulp-download');
var fs = require('fs-extra');
var gulp = require('gulp');
var gutil = require('gulp-util');
-var replace = require('gulp-replace');
-var unzip = require('gulp-unzip');
var zip = require('gulp-zip');
var stagingPath = config.paths.staging.zip;
@@ -50,9 +45,9 @@ gulp.task('zip:upload', ['stage:zip'], function(done) {
});
gulp.task('zip:update-references', ['zip:upload'], function(done) {
- if(args.release) {
+ if (args.release) {
common.ssh(user, host, "sed -i '1i elements/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'VERSIONS', done);
- } else if(args.preRelease) {
+ } else if (args.preRelease) {
common.ssh(user, host, "sed -i '1i elements/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'PRERELEASES', done);
} else {
common.ssh(user, host, 'echo elements/' + majorMinorVersion + '/' + version + ' > ' + args.zipDestination + 'SNAPSHOT', done);
@@ -60,69 +55,3 @@ gulp.task('zip:update-references', ['zip:upload'], function(done) {
});
gulp.task('deploy:zip', ['zip:upload', 'zip:update-references']);
-
-gulp.task('zip-test:clean', function() {
- fs.removeSync(stagingPath + '/test');
-});
-
-gulp.task('zip-test:download', ['zip-test:clean'], function() {
- var url = args.zipUrl || 'https://vaadin.com/download/elements';
- return download(url + '/' + majorMinorVersion +'/' + version + '/' + filename)
- .pipe(gulp.dest(stagingPath + '/test'));
-});
-
-gulp.task('zip-test:unzip', ['zip-test:download'], function() {
- return gulp.src(stagingPath + '/test/' + filename)
- .pipe(unzip())
- .pipe(gulp.dest(stagingPath + '/test'));
-});
-
-gulp.task('zip-test:install-wct', ['zip-test:download'], function() {
- return bower({
- cwd: stagingPath + '/test',
- directory: '.',
- cmd: 'install'
- }, [['web-component-tester#2.2.6']]);
-});
-
-// TODO: Haven't been fixed for the new project structure. Once the tests are in use,
-// apply similar changes as in cdn.js
-config.elements.forEach(function (n) {
- gulp.task('zip-test:stage:' + n, ['zip-test:download'], function() {
- return gulp.src('vaadin-elements/' + n + '/test/**/*')
- .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/\.\.\/\.\.\/(bower_components|node_modules)\//mg, '$1=$2../../$3'))
- .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/\.\.\/(bower_components|node_modules)\//mg, '$1=$2../../$3'))
- .pipe(replace(/(src|href)=("|')(.*?)\.\.\/(vaadin-)/mg, '$1=$2../../' + n + '/$3$4'))
- .pipe(gulp.dest(stagingPath + '/test/test/' + n + '/'));
- });
-});
-
-gulp.task('zip-test:stage', _.map(config.elements, function(n) {
- return 'zip-test:stage:'+n;
-}));
-
-gulp.task('verify:zip', ['zip-test:unzip', 'zip-test:install-wct', 'zip-test:stage'], function(done) {
- if(args.autoRevert) {
- common.checkArguments(['zipUsername', 'zipDestination']);
- }
-
- common.testSauce(
- ['target/zip/test/test/**/index.html'],
- ['Windows 7/internet explorer@11'],
- 'vaadin-elements / vaadin.com / ' + version,
- function(err) {
- common.autoRevert(err, function() {
- var path = args.zipDestination + majorMinorVersion + '/' + version;
-
- gutil.log('Deleting package ' + path);
-
- // remove the version from VERSIONS
- common.ssh(user, host, 'grep -v "elements/' + majorMinorVersion + '/' + version + '" ' +
- args.zipDestination + 'VERSIONS > temp && mv temp ' + args.zipDestination + 'VERSIONS', function(error) {
- if(error) done(error);
- // remove the package
- common.ssh(user, host, 'rm -rf ' + path, done);
- });
- }, done);
- });
-});