-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support: Action failing on v0.103.0+ due to archive name standardization #608
Comments
Thanks. related to #605 |
I think it's a related issue, but not a duplicate - they first changed the naming for the macOS package from |
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 peaceiris#608 - Fixes peaceiris#605
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 peaceiris#608 - Fixes peaceiris#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 introduces the getConventions function, which does a one-time calculation for the changes in packaging conventions to propagate to the getArch and getOS functions. It updates those functions and the installer code to leverage the conventions. Finally, it updates the test arrangement for getArch and getOS to use test cases instead of repeating the same test over and over and adds unit tests for the new getConventions function.
* update hugo and npm * update hugo * revert hugo becasue of peaceiris/actions-hugo#608
* update hugo and npm * update hugo * revert hugo becasue of peaceiris/actions-hugo#608 * update about
Sorry to chime in annoyingly, but any chance this could get an update? I've also ran into this issue which makes using the action difficult. Appreciate all of your time/debugging here. <3 |
Checklist
Describe your question
Up until hugo v0.102.3, the action was able to discover and install the latest version. Starting with v0.103.0, x64 installs fail due to package renaming.
The release notes state:
In v0.103.0 the only versions aliased to
64bit
from the newamd64
arehugo_<version>_Linux
andhugo_extended_<version>_Linux
.The canonical new naming convention (for platforms/formats supported by this action) is:
hugo_<version>_darwin-universal.tar.gz
hugo_<version>_linux-amd64.tar.gz
hugo_<version>_windows-amd64.zip
hugo_extended_<version>_darwin-universal.tar.gz
hugo_extended_<version>_linux-amd64.tar.gz
hugo_extended_<version>_windows-amd64.zip
These have been stable since v0.103.0 and are used in the most recent release, v0.104.3.
For backwards compatibility, I suggest:
os
andarch
segments of the download url. Due to the changes to macOS,arch
also needs to take theos
into account.os
should bedarwin
for 0.103.0+, and otherwisemacOS
.arch
should beuniversal
for 0.102.0+, and otherwise the old values.os
should belinux
for 0.103.0+, and otherwiseLinux
.arch
should beamd64
orarm64
for 0.103.0+, and otherwise the old values.os
should bewindows
for 0.103.0+, and otherwiseWindows
.arch
should beamd64
orarm64
for 0.103.0+, and otherwise the old values.Relevant links
Failing workflow run: https://github.com/platenio/platen-template/actions/runs/3186514784/jobs/5204230214#step:3:37
Relevant log output
Additional context.
I'm happy to put up a (naive) PR for this, though I don't think I've got the time/skill to add appropriate testing in a quick or elegant fashion.
The text was updated successfully, but these errors were encountered: