Skip to content

Commit

Permalink
JBDS-4198 Use redirects for OpenSHift CLI Download
Browse files Browse the repository at this point in the history
  • Loading branch information
dgolovin committed Nov 29, 2016
1 parent 3bf9a1b commit 107f334
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gulp-tasks/dist-darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function darwinDist(gulp) {
});

gulp.task('dist', function(){
return runSequence('clean','update-package','dist-simple','dist-bundle','cleanup');
return runSequence('clean','check-requirements','update-package','dist-simple','dist-bundle','cleanup');
});

gulp.task('update-package',['update-requirements'], function() {
Expand Down
2 changes: 1 addition & 1 deletion requirements-darwin.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description": "The Open Source Container Application Platform",
"bundle": "yes",
"version": "1.3.1",
"url": "https://github.com/openshift/origin/releases/download/v1.3.1/openshift-origin-client-tools-v1.3.1-2748423-mac.zip",
"url": "https://developers.redhat.com/redirect/to/oc-origin-cli-macos-1.3.1.download",
"filename": "openshift-origin-client-tools-v1.3.1-2748423-mac.zip",
"sha256sum": "252ee8a1ff8a455a9b55aff82f6980dbf28bd75b601414765b4f06f6c1ec370e",
"virusTotalReport": "https://virustotal.com/en/file/252ee8a1ff8a455a9b55aff82f6980dbf28bd75b601414765b4f06f6c1ec370e/analysis/",
Expand Down
2 changes: 1 addition & 1 deletion requirements-win32.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description": "The Open Source Container Application Platform",
"bundle": "yes",
"version": "1.3.1",
"url": "https://github.com/openshift/origin/releases/download/v1.3.1/openshift-origin-client-tools-v1.3.1-dad658de7465ba8a234a4fb40b5b446a45a4cee1-windows.zip",
"url": "https://developers.redhat.com/redirect/to/oc-origin-cli-win64-1.3.1.download",
"filename": "openshift-origin-client-tools-v1.3.1-dad658de7465ba8a234a4fb40b5b446a45a4cee1-windows.zip",
"sha256sum": "b90bc1249e7407717b0a0d7f92248ed6926ae0cd27d8fd038e054b866fa84baf",
"virusTotalReport": "https://virustotal.com/en/file/b90bc1249e7407717b0a0d7f92248ed6926ae0cd27d8fd038e054b866fa84baf/analysis/",
Expand Down
15 changes: 9 additions & 6 deletions test/check-requirements.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ let count = 0;

function checkRequirements() {
for (var attribute in reqs) {
data[attribute] = reqs[attribute].url;
count++;
// sha256 is not set for macOS Java SE
if(reqs[attribute].sha256sum !== '') {
data[attribute] = reqs[attribute].url;
count++;
}
}

//to check if the url looks like it points to what it is supposed to
fileNames['cdk.zip'] = 'cdk';
fileNames['rhel-vagrant-virtualbox.box'] = 'vagrant-virtualbox.box';
fileNames['oc.zip'] = 'openshift-origin-client-tools';
fileNames['oc.zip'] = 'oc-origin-cli';
fileNames['cygwin.exe'] = 'cygwin';
fileNames['jbds.jar'] = 'devstudio';
fileNames['jdk.msi'] = 'openjdk';
Expand All @@ -26,15 +29,15 @@ function checkRequirements() {
fileNames['7zip.zip'] = '7-Zip';
fileNames['7zip-extra.zip'] = '7-Zip';

//to check if the files are rougly the size the should be
//to check if the files are rougly the size they should be
minSizes['cdk.zip'] = 50 * 1024;
minSizes['rhel-vagrant-virtualbox.box'] = 750 * 1024 * 1024;
minSizes['oc.zip'] = 10 * 1024 * 1024;
minSizes['cygwin.exe'] = 500 * 1024;
minSizes['jbds.jar'] = 400 * 1024 * 1024;
minSizes['jdk.msi'] = 50 * 1024 *1024;
minSizes['vagrant.msi'] = 120 * 1024 * 1024;
minSizes['virtualbox.exe'] = 100 * 1024 * 1024;
minSizes['vagrant.msi'] = 80 * 1024 * 1024;
minSizes['virtualbox.exe'] = 85 * 1024 * 1024;
minSizes['7zip.zip'] = 200 * 1024;
minSizes['7zip-extra.zip'] = 400 * 1024;

Expand Down

0 comments on commit 107f334

Please sign in to comment.