Skip to content

Commit

Permalink
updating log messages based on epixas comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Sep 23, 2016
1 parent 605605c commit 0f7112b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tasks/build/download_node_builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function downloadNodeBuilds(grunt) {
const [sha, platform] = line.split(' ');
shaSums[platform] = sha;
});
grunt.log.ok(`sha sums download complete`);
});
};

Expand All @@ -50,9 +49,7 @@ export default function downloadNodeBuilds(grunt) {
}

return checkHashFromFileAsync(filePath, expected).then(([passed, actual]) => {
if (passed) {
grunt.log.ok(`${platform.name} shasum verified`);
} else {
if (!passed) {
grunt.log.error(`${platform.name} shasum check failed`);
}
return passed;
Expand All @@ -68,8 +65,6 @@ export default function downloadNodeBuilds(grunt) {
grunt.file.delete(filePath);
}

grunt.log.ok(`downloading ${platform.name}`);

return wreckGetAsync(platform.nodeUrl)
.then(([resp, payload]) => {
if (resp.statusCode !== 200) {
Expand All @@ -92,8 +87,8 @@ export default function downloadNodeBuilds(grunt) {
if (isDownloadValid) return;
}

grunt.log.ok('starting download ...');
while (!isDownloadValid && (downloadCounter < downloadLimit)) {
grunt.log.ok(`Downloading ${platform.name} and corresponding sha`);
await getNodeBuild(platform);
isDownloadValid = await checkShaSum(platform);
++downloadCounter;
Expand All @@ -103,7 +98,7 @@ export default function downloadNodeBuilds(grunt) {
throw new Error(`${platform.name} download failed`);
}

grunt.log.ok(`download of ${platform.name} completed successfully`);
grunt.log.ok(`${platform.name} downloaded and verified`);
};

grunt.registerTask('_build:downloadNodeBuilds', function () {
Expand Down

0 comments on commit 0f7112b

Please sign in to comment.