mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-24 20:12:15 +01:00
Refactor: enhance Hugo version dumping (#39)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user