Refactor: enhance Hugo version dumping (#39)

This commit is contained in:
Shohei Ueda
2019-09-22 10:24:28 +09:00
committed by GitHub
parent 39aa1b7d04
commit d7d48e3009
2 changed files with 4 additions and 2 deletions

View File

@@ -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<void> {
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();
}