refactor: enhance hugo version dumping
This commit is contained in:
parent
39aa1b7d04
commit
5d1c5572d1
1 changed files with 2 additions and 1 deletions
|
|
@ -12,11 +12,11 @@ async function run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const hugoVersion: string = core.getInput('hugo-version');
|
const hugoVersion: string = core.getInput('hugo-version');
|
||||||
console.log(`Hugo version: ${hugoVersion}`);
|
|
||||||
|
|
||||||
if (hugoVersion === '' || hugoVersion === 'latest') {
|
if (hugoVersion === '' || hugoVersion === 'latest') {
|
||||||
getLatestVersion().then(
|
getLatestVersion().then(
|
||||||
async function(latestVersion): Promise<void> {
|
async function(latestVersion): Promise<void> {
|
||||||
|
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
|
||||||
await installer(latestVersion);
|
await installer(latestVersion);
|
||||||
await dump();
|
await dump();
|
||||||
},
|
},
|
||||||
|
|
@ -25,6 +25,7 @@ async function run() {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
console.log(`Hugo version: ${hugoVersion}`);
|
||||||
await installer(hugoVersion);
|
await installer(hugoVersion);
|
||||||
await dump();
|
await dump();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue