Skip to content

Commit abb0804

Browse files
committed
Merge branch 'master' of github.com:redhat-developer-tooling/developer-platform-install into JBDS-4026
2 parents d7b7347 + 4e524f1 commit abb0804

7 files changed

Lines changed: 27 additions & 15 deletions

File tree

browser/model/helpers/downloader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Downloader {
103103
.on('data', this.dataHandler.bind(this))
104104
.on('end', this.endHandler.bind(this, stream))
105105
.pipe(stream)
106-
.on('finish', this.closeHandler.bind(this,stream.path,sha,options));
106+
.on('close', this.closeHandler.bind(this,stream.path,sha,options));
107107
}
108108

109109
downloadAuth(options, username, password, file, sha) {
@@ -116,7 +116,7 @@ class Downloader {
116116
.on('data', this.dataHandler.bind(this))
117117
.on('end', this.endHandler.bind(this, stream))
118118
.pipe(stream)
119-
.on('finish', this.closeHandler.bind(this,stream.path,sha,options));
119+
.on('close', this.closeHandler.bind(this,stream.path,sha,options));
120120
}
121121

122122

browser/model/helpers/hash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Hash {
1010
while (null !== (chunk = readStream.read())) {
1111
hash.update(chunk);
1212
}
13-
}).on('end', function () {
13+
}).on('close', function () {
1414
var hashstring = hash.digest('hex');
1515
done(hashstring);
1616
});

browser/model/virtualbox.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class VirtualBoxInstall extends InstallableItem {
2222

2323
this.minimumVersion = '5.0.26';
2424
this.version = version || '5.0.26';
25+
this.maximumVersion = '5.1.0';
2526
this.revision = revision;
2627
this.downloadedFileName = 'virtualbox.exe';
2728
this.bundledFile = path.join(this.downloadFolder, this.downloadedFileName);
@@ -98,7 +99,7 @@ class VirtualBoxInstall extends InstallableItem {
9899
var command = '"' + path.join(output, 'VBoxManage' + extension) +'"' + ' --version';
99100
return Util.executeCommand(command, 1);
100101
}).then((output) => {
101-
let version = versionRegex.exec(output)[1];
102+
let version = versionRegex.exec(output)[1];
102103
this.addOption('detected',version,tempDetectedLocation,Version.GE(version,this.minimumVersion));
103104
this.selectedOption = 'detected';
104105
this.validateVersion();
@@ -119,10 +120,14 @@ class VirtualBoxInstall extends InstallableItem {
119120
installOption.valid = false;
120121
installOption.error = 'oldVersion';
121122
installOption.warning = '';
122-
} else if(Version.GT(installOption.version,this.minimumVersion)) {
123+
} else if(Version.GT(installOption.version,this.minimumVersion) && Version.LT(installOption.version,this.maximumVersion)) {
123124
installOption.valid = true;
124125
installOption.error = '';
125126
installOption.warning = 'newerVersion';
127+
} else if(Version.GE(installOption.version,this.maximumVersion)) {
128+
installOption.valid = false;
129+
installOption.error = '';
130+
installOption.warning = 'newerVersion';
126131
}
127132
}
128133

browser/pages/confirm/confirm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120

121121
<div class="message-container error-message" ng-show="!checkboxModel.virtualbox.isConfigured() && checkboxModel.cdk.selectedOption == 'install'">
122122
<span class="pficon pficon-error-circle-o"></span>
123-
<span>Red Hat Container Development Kit requires Oracle VirtualBox 5.0.8 or newer. Please uninstall detected Oracle VirtualBox and restart Installer to continue.</span>
123+
<span>Red Hat Container Development Kit requires Oracle VirtualBox {{checkboxModel.virtualbox.minimumVersion}} or newer 5.0.x release. Please uninstall detected Oracle VirtualBox and restart Installer to continue.</span>
124124
</div>
125125

126126
<!-- Cygwin -->
@@ -288,7 +288,7 @@
288288

289289
<div class="message-container error-message" ng-show="!checkboxModel.vagrant.isConfigured() && checkboxModel.cdk.selectedOption == 'install'">
290290
<span class="pficon pficon-error-circle-o"></span>
291-
<span>Red Hat Container Development Kit requires Vagrant 1.7.4 or newer. Please uninstall detected Vagrant and restart Installer to continue.</span>
291+
<span>Red Hat Container Development Kit requires Vagrant {{checkboxModel.vagrant.minimumVersion}} or newer. Please uninstall detected Vagrant and restart Installer to continue.</span>
292292
</div>
293293

294294
<!-- CDK -->

gulpfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ gulp.task('create-7zip-archive', function(cb) {
146146
// only include prefetch folder when zipping if the folder exists and we're doing a bundle build
147147
if (fs.existsSync(path.resolve(prefetchFolder)) && installerExe.indexOf("-bundle") > 0) {
148148
packCmd = packCmd + ' ' + path.resolve(prefetchFolder) + path.sep + '*';
149+
} else {
150+
packCmd = packCmd + ' ' + path.resolve(prefetchFolder) + path.sep + 'cygwin.exe';
149151
}
150152
//console.log('[DEBUG]' + packCmd);
151153
exec(packCmd, createExecCallback(cb, true));
@@ -255,7 +257,7 @@ function createSHA256File(filename, cb) {
255257
// Create stub installer that will then download all the requirements
256258
gulp.task('package-simple', function(cb) {
257259
runSequence(['check-requirements', 'clean'], 'create-dist-win-dir', 'update-requirements', ['generate',
258-
'prepare-tools'], 'package', 'cleanup', cb);
260+
'prepare-tools'], 'prefetch-cygwin', 'package', 'cleanup', cb);
259261
});
260262

261263
gulp.task('package-bundle', function(cb) {
@@ -326,6 +328,11 @@ gulp.task('prefetch', ['create-prefetch-cache-dir'], function() {
326328
return prefetch('yes', prefetchFolder);
327329
});
328330

331+
// prefetch cygwin to always include into installer
332+
gulp.task('prefetch-cygwin', ['create-prefetch-cache-dir'], function() {
333+
return prefetch('always', prefetchFolder);
334+
});
335+
329336
gulp.task('prefetch-tools', ['create-tools-dir'], function() {
330337
return prefetch('tools', toolsFolder);
331338
});

requirements.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"cygwin.exe": {
3737
"name": "Cygwin",
3838
"description": "A distribution of popular GNU and other Open Source tools running on Microsoft Windows",
39-
"bundle": "yes",
40-
"version": "2.5.2",
41-
"url": "https://developers.redhat.com/redirect/to/cygwin-installer-2.5.2.download",
42-
"filename": "cygwin_2.5.2.exe",
39+
"bundle": "always",
40+
"version": "2.6.0",
41+
"url": "https://cygwin.com/setup-x86_64.exe",
42+
"filename": "cygwin_2.6.0.exe",
4343
"sha256sum": "58f9f42f5dbd52c5e3ecd24e537603ee8897ea15176b7acdc34afcef83e5c19a",
4444
"virusTotalReport": "https://virustotal.com/en/file/58f9f42f5dbd52c5e3ecd24e537603ee8897ea15176b7acdc34afcef83e5c19a/analysis/",
4545
"vendor": "Community Project"

test/unit/model/helpers/hash-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Hash', function() {
3939
expect(createHashStub).to.have.been.calledWith('sha256');
4040
done();
4141
});
42-
stream.emit('end');
42+
stream.emit('close');
4343
});
4444

4545
it('should read the specified file', function(done) {
@@ -48,7 +48,7 @@ describe('Hash', function() {
4848
expect(readStreamStub).to.have.been.calledWith('file');
4949
done();
5050
});
51-
stream.emit('end');
51+
stream.emit('close');
5252
});
5353

5454
it('should create a hex string when the file is done reading', function(done) {
@@ -58,7 +58,7 @@ describe('Hash', function() {
5858
expect(spy).to.have.been.calledWith('hex');
5959
done();
6060
});
61-
stream.emit('end');
61+
stream.emit('close');
6262
});
6363
})
6464
});

0 commit comments

Comments
 (0)