From e61208deeb4bc43b2c641b01b5d471dcc051bc03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sauli=20T=C3=A4hk=C3=A4p=C3=A4=C3=A4?= Date: Thu, 26 Nov 2015 14:50:21 +0200 Subject: [PATCH] Remove unused deployment CDN scripts. --- gulpfile.js | 16 +------------ tasks/cdn.js | 66 ---------------------------------------------------- 2 files changed, 1 insertion(+), 81 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 3d4ab28..e9485b2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,18 +12,4 @@ gulp.task('default', function() { gulp.task('clean', ['clean:cdn', 'clean:zip']); -gulp.task('tag', ['deploy:cdn', 'deploy:zip'], function() { - if(args.release) { - version = args.version || version; - return git.tag(version, 'Release version ' + version, {cwd: '.'}, function (err) { - if (err) throw err; - return git.push('origin', version, {cwd: '.', args: '--tags'}); - }); - } -}); - -gulp.task('deploy', ['tag']); - -// can't run all the verification concurrently until sauce-connect-launcher supports -// multiple tunnels -//gulp.task('verify', ['verify:cdn', 'verify:zip]); +gulp.task('deploy', ['deploy:cdn', 'deploy:zip']); diff --git a/tasks/cdn.js b/tasks/cdn.js index d6ea3c7..d8a3ae6 100644 --- a/tasks/cdn.js +++ b/tasks/cdn.js @@ -3,15 +3,10 @@ var config = require('./config'); var common = require('./common'); var gulp = require('gulp'); var fs = require('fs-extra'); -var markdown = require('gulp-markdown'); -var replace = require('gulp-replace'); var modify = require('gulp-modify'); var rsync = require('gulp-rsync'); var gutil = require('gulp-util'); -var _ = require('lodash'); var args = require('yargs').argv; -var git = require('gulp-git'); -var addsrc = require('gulp-add-src'); var stagingBasePath = config.paths.staging.cdn; var version = config.version; @@ -74,64 +69,3 @@ gulp.task('deploy:cdn', ['upload:cdn'], function(done) { done(); } }); - -gulp.task('cdn-test:clean', function() { - fs.removeSync(stagingPath + '/test'); -}); - -gulp.task('cdn-test:install-dependencies', function() { - return bower({ - directory: stagingPath, - cmd: 'install' - }, [['web-component-tester#2.2.6']]); -}); - -config.elements.forEach(function (n) { - gulp.task('cdn-test:stage:' + n, ['cdn-test:clean', 'cdn-test:install-dependencies'], function(done) { - fs.mkdirsSync(testPath); - return git.clone('https://github.com/vaadin/' + n, {cwd: testPath}, function (err) { - gulp.src(testPath + '/' + n + '/test/**') - .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/(bower_components|node_modules)\/(.*?)\//mg, '$1=$2https://cdn.vaadin.com/vaadin-elements/'+ version + '/$5/')) - .pipe(replace(/(src|href)=("|')(.*?)\.\.\//mg, '$1=$2https://cdn.vaadin.com/vaadin-elements/'+ version +'/' + n + '/')) - .pipe(replace(/(src|href)=("|')(.*?)(web-component-tester)\//mg, '$1=$2../../web-component-tester/')) - .pipe(gulp.dest(testPath + '/' + n + '/test/')); - done(); - }); - }); -}); - -gulp.task('cdn-test:stage', _.map(config.elements, function (n) { - return 'cdn-test:stage:' + n; -})); - -gulp.task('verify:cdn', ['cdn-test:stage'], function(done) { - if(args.autoRevert) { - common.checkArguments(['cdnUsername', 'cdnDestination']); - } - - // use unique browser combination because bower,cdn,zip verifications are run - // at the same time and TeamCity test results will get mixed up if same browsers are used. - common.testSauce( - ['target/cdn/' + version + '/test/**/index.html'], - ['Windows 7/firefox@36'], - 'vaadin-elements / cdn.vaadin.com / ' + version, - function(err) { - common.autoRevert(err, function() { - gutil.log('Deleting folder ' + args.cdnDestination + version); - - require('node-ssh-exec')({ - host: host, - username: args.cdnUsername, - privateKey: config.paths.privateKey() - }, 'rm -rf ' + args.cdnDestination + version, function (error, response) { - if (error) { - throw error; - } - - gutil.log(response); - - done(err); - }); - - }, done);}); -}); -- 2.39.5