dominique-mueller / hugo-installer

Installs hugo into your repository.
https://www.npmjs.com/package/hugo-installer
MIT License
21 stars 4 forks source link

Downloads for macOS fail due to naming convention change with Hugo 0.89.0 #43

Closed ophilippsen closed 1 year ago

ophilippsen commented 2 years ago

while updating dependencies to latest Hugo release 0.89.0 I notice a breaking change in file naming conventions. Since Hugo Release 0.89.0 generated binaries for macOS are named like this:

Autodetected arch from system is not used any longer.

Using the Hugo-installer with following configuration

{ "name": "test-install", "version": "1.0.1", "scripts": { "postinstall": "hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo" }, "devDependencies": { "hugo-installer": "^3.1", }, "otherDependencies": { "hugo": "0.89.0" }

results into following errors:

Hugo Installer Checking for existing binary Downloading binary from "https://github.com/gohugoio/hugo/releases/download/v0.89.0/hugo_extended_0.89.0_macOS-64bit.tar.gz" Error: An error occured while trying to download the binary from "https://github.com/gohugoio/hugo/releases/download/v0.89.0/hugo_extended_0.89.0_macOS-64bit.tar.gz". Details: Response code 404 (Not Found)

dominique-mueller commented 2 years ago

Soooo, it looks like they tried to start publishing fat binaries for MacOS starting with 0.89.0 (see Changelog) - but that didn't go as planned, and so they reverted the change and released 0.89.1 (see Changelog). Looking at all subsequent releases it seems that it stayed this way, and the change to fat binaries has been delayed for now.

So with the exception of exactly 0.89.0 other releases should work just fine?

dominique-mueller commented 2 years ago

Interestingly enough, they also seemed to have release issues with 0.88.0 regarding MacOS binaries, so they are missing for this exact version as well, later fixed with 0.88.1.

dominique-mueller commented 1 year ago

So, to summarize: There is no fix for the specific version that is 0.88.0 (because release assets have not been fixed on the Hugo side of things), but newer versions (e.g. the patched 0.88.1) should work just fine.

Also, the latest release 4.0.0 is now aware of the missing binary and exits with a more precise error.