From d7d48e3009c8e8a8c08d663901695a70feef01a1 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Sun, 22 Sep 2019 10:24:28 +0900 Subject: [PATCH] Refactor: enhance Hugo version dumping (#39) --- lib/index.js | 3 ++- src/index.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index a8362ae..a00b600 100644 --- a/lib/index.js +++ b/lib/index.js @@ -32,10 +32,10 @@ function run() { }); try { const hugoVersion = core.getInput('hugo-version'); - console.log(`Hugo version: ${hugoVersion}`); if (hugoVersion === '' || hugoVersion === 'latest') { get_latest_version_1.default().then(function (latestVersion) { return __awaiter(this, void 0, void 0, function* () { + console.log(`Hugo version: ${latestVersion} (${hugoVersion})`); yield installer_1.default(latestVersion); yield dump(); }); @@ -44,6 +44,7 @@ function run() { }); } else { + console.log(`Hugo version: ${hugoVersion}`); yield installer_1.default(hugoVersion); yield dump(); } diff --git a/src/index.ts b/src/index.ts index 193d634..b597dd1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,11 +12,11 @@ async function run() { try { const hugoVersion: string = core.getInput('hugo-version'); - console.log(`Hugo version: ${hugoVersion}`); if (hugoVersion === '' || hugoVersion === 'latest') { getLatestVersion().then( async function(latestVersion): Promise { + console.log(`Hugo version: ${latestVersion} (${hugoVersion})`); await installer(latestVersion); await dump(); }, @@ -25,6 +25,7 @@ async function run() { } ); } else { + console.log(`Hugo version: ${hugoVersion}`); await installer(hugoVersion); await dump(); }