Skip to content

Commit

Permalink
Update Hugo to v0.103.0 and adapt filenames to the new version
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Sep 16, 2022
1 parent f81169a commit e26842b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
44 changes: 22 additions & 22 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ const destDir = path.join(fileURLToPath(new URL('../vendor', import.meta.url)));
const binName = process.platform === 'win32' ? 'hugo.exe' : 'hugo';

const extendedBin = (baseDownloadUrl) => new BinWrapper()
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_Linux-ARM64.tar.gz`, 'linux', 'arm64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_macOS-universal.tar.gz`, 'darwin', 'x64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_macOS-universal.tar.gz`, 'darwin', 'arm64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_darwin-universal.tar.gz`, 'darwin', 'arm64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_darwin-universal.tar.gz`, 'darwin', 'x64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_linux-amd64.tar.gz`, 'linux', 'x64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_linux-arm64.tar.gz`, 'linux', 'arm64')
.src(`${baseDownloadUrl}hugo_extended_${hugoVersion}_windows-amd64.zip`, 'win32', 'x64')
// Fall back to the normal version on unsupported platforms
.src(`${baseDownloadUrl}hugo_${hugoVersion}_DragonFlyBSD-64bit.tar.gz`, 'dragonflybsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_FreeBSD-64bit.tar.gz`, 'freebsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Linux-ARM.tar.gz`, 'linux', 'arm')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_NetBSD-64bit.tar.gz`, 'netbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_OpenBSD-64bit.tar.gz`, 'openbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Windows-ARM64.zip`, 'win32', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_dragonfly-amd64.tar.gz`, 'dragonflybsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_freebsd-amd64.tar.gz`, 'freebsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_linux-arm.tar.gz`, 'linux', 'arm')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_netbsd-amd64.tar.gz`, 'netbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_openbsd-amd64.tar.gz`, 'openbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_windows-arm64.zip`, 'win32', 'arm64')
.dest(destDir)
.use(binName);

const normalBin = (baseDownloadUrl) => new BinWrapper()
.src(`${baseDownloadUrl}hugo_${hugoVersion}_DragonFlyBSD-64bit.tar.gz`, 'dragonflybsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_FreeBSD-64bit.tar.gz`, 'freebsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Linux-ARM.tar.gz`, 'linux', 'arm')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Linux-ARM64.tar.gz`, 'linux', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_macOS-universal.tar.gz`, 'darwin', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_macOS-universal.tar.gz`, 'darwin', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_NetBSD-64bit.tar.gz`, 'netbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_OpenBSD-64bit.tar.gz`, 'openbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_Windows-ARM64.zip`, 'win32', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_darwin-universal.tar.gz`, 'darwin', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_darwin-universal.tar.gz`, 'darwin', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_dragonfly-amd64.tar.gz`, 'dragonflybsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_freebsd-amd64.tar.gz`, 'freebsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_linux-amd64.tar.gz`, 'linux', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_linux-arm.tar.gz`, 'linux', 'arm')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_linux-arm64.tar.gz`, 'linux', 'arm64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_netbsd-amd64.tar.gz`, 'netbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_openbsd-amd64.tar.gz`, 'openbsd', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_windows-amd64.zip`, 'win32', 'x64')
.src(`${baseDownloadUrl}hugo_${hugoVersion}_windows-arm64.zip`, 'win32', 'arm64')
.dest(destDir)
.use(binName);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hugo-bin",
"version": "0.90.4",
"hugoVersion": "0.102.3",
"hugoVersion": "0.103.0",
"description": "Binary wrapper for Hugo",
"repository": {
"type": "git",
Expand Down

1 comment on commit e26842b

@gabrielmaldi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR, thank you for keeping up with all these recent changes in Hugo! ❤️

Please sign in to comment.