(GH-608) Fix package url for v0.102.0 & v0.103.0
Prior to this change, the URL building for versions of hugo was deterministic as the URLs for the packages were set to a project-specific standard. That URL creation began to fail for macOS in [0.102.0] and for Windows in [0.103.0]. It does not fail for Linux because the hugo releases for Linux continue to include the old package naming as an alias. This change: - Updates the `get-os` function to take the hugo version as additional input, altering the return value based on the version. - Updates the `get-arch` function to take the operating system name and hugo version as additional input, altering the return value based on both. Including the OS name is required for handling macOS. - Fixes #608 - Fixes #605 [0.102.0]: https://github.com/gohugoio/hugo/releases/tag/v0.102.0 [0.103.0]: https://github.com/gohugoio/hugo/releases/tag/v0.103.0
This commit is contained in:
parent
a2eba60698
commit
e70fd029fa
5 changed files with 101 additions and 19 deletions
|
|
@ -47,10 +47,10 @@ export async function installer(version: string): Promise<void> {
|
|||
const extended: string = core.getInput('extended');
|
||||
core.debug(`Hugo extended: ${extended}`);
|
||||
|
||||
const osName: string = getOS(process.platform);
|
||||
const osName: string = getOS(process.platform, version);
|
||||
core.debug(`Operating System: ${osName}`);
|
||||
|
||||
const archName: string = getArch(process.arch);
|
||||
const archName: string = getArch(process.arch, osName, version);
|
||||
core.debug(`Processor Architecture: ${archName}`);
|
||||
|
||||
const toolURL: string = getURL(osName, archName, extended, version);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue