diff options
author | Manolo Carrasco <manolo@apache.org> | 2015-09-17 20:39:12 +0200 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2015-09-17 21:18:23 +0200 |
commit | fe993897f3cd44d8f40d95be7b064d5c36d4eebb (patch) | |
tree | a254e508f69d2c64029b59b6cdecc33abda0fc37 /tasks/zip.js | |
parent | ca9c00e809fd686c7cd533d982e6bd37e64cc7e6 (diff) | |
download | vaadin-core-fe993897f3cd44d8f40d95be7b064d5c36d4eebb.tar.gz vaadin-core-fe993897f3cd44d8f40d95be7b064d5c36d4eebb.zip |
Adding command to make a remote symlink
Diffstat (limited to 'tasks/zip.js')
-rw-r--r-- | tasks/zip.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tasks/zip.js b/tasks/zip.js index fc0f854..f649d98 100644 --- a/tasks/zip.js +++ b/tasks/zip.js @@ -12,7 +12,8 @@ var unzip = require('gulp-unzip'); var zip = require('gulp-zip'); var stagingPath = config.paths.staging.zip; -var version = args.release || args.preRelease ? config.version : config.snapshotVersion; +var version = config.version; +var host = config.zipHost; var filename = 'vaadin-components-' + version + '.zip'; var majorMinorVersion = version.replace(/(\d+\.\d+)(\.|-)(.*)/, '$1'); @@ -29,13 +30,12 @@ gulp.task('stage:zip', ['clean:zip', 'stage:cdn'], function() { gulp.task('zip:upload', ['stage:zip'], function(done) { common.checkArguments(['zipUsername', 'zipDestination']); - var hostName = args.zipHostname || 'vaadin.com'; var path = args.zipDestination + majorMinorVersion + '/' + version + '/' + filename; - gutil.log('Uploading zip package (scp): ' + stagingPath + '/' + filename + ' -> ' + args.zipUsername + '@' + hostName + ':' + path); + gutil.log('Uploading zip package (scp): ' + stagingPath + '/' + filename + ' -> ' + args.zipUsername + '@' + host + ':' + path); require('scp2').scp(stagingPath + '/' + filename, { - host: hostName, + host: host, username: args.zipUsername, privateKey: config.paths.privateKey(), path: path @@ -45,11 +45,10 @@ gulp.task('zip:upload', ['stage:zip'], function(done) { }); function ssh(command, done) { - var hostName = args.sshHostname || 'vaadin.com'; - gutil.log('SSH: ' + hostName + ' -> ' + command); + gutil.log('SSH: ' + host + ' -> ' + command); require('node-ssh-exec')({ - host: hostName, + host: host, username: args.zipUsername, privateKey: config.paths.privateKey() }, command, |