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 Oct 29, 2016
1 parent 325e172 commit 20b5c4d
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 20b5c4d

Please sign in to comment.