From 20b5c4dca2a88d43dfce9a5850529f5bed7391f2 Mon Sep 17 00:00:00 2001 From: ppisljar Date: Fri, 23 Sep 2016 08:24:55 +0200 Subject: [PATCH] updating log messages based on epixas comments --- tasks/build/download_node_builds.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tasks/build/download_node_builds.js b/tasks/build/download_node_builds.js index 132d02acbcdc4..ef1c822d15d18 100644 --- a/tasks/build/download_node_builds.js +++ b/tasks/build/download_node_builds.js @@ -32,7 +32,6 @@ export default function downloadNodeBuilds(grunt) { const [sha, platform] = line.split(' '); shaSums[platform] = sha; }); - grunt.log.ok(`sha sums download complete`); }); }; @@ -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; @@ -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) { @@ -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; @@ -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 () {