Skip to content

Commit

Permalink
Add missing platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 22, 2021
1 parent 56652f5 commit d52698d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,30 @@ const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersi

const binNameMap = {
darwin: {
arm64: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
freebsd: {
arm: 'hugo',
arm64: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
linux: {
arm: 'hugo',
arm64: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
netbsd: {
arm: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
openbsd: {
arm: 'hugo',
arm64: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
Expand All @@ -39,6 +53,7 @@ const binName = (binNameMap[process.platform] && binNameMap[process.platform][pr
const extendedBin = new BinWrapper()
.src(`${baseUrl}hugo_extended_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64')
.src(`${baseUrl}hugo_extended_${hugoVersion}_macOS-64bit.tar.gz`, 'darwin', 'x64')
.src(`${baseUrl}hugo_extended_${hugoVersion}_macOS-ARM64.tar.gz`, 'darwin', 'arm64')
.src(`${baseUrl}hugo_extended_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
// Falling back to normal version on non supported platforms
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-32bit.tar.gz`, 'freebsd', 'x86')
Expand All @@ -55,11 +70,21 @@ const normalBin = new BinWrapper()
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-32bit.tar.gz`, 'freebsd', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-64bit.tar.gz`, 'freebsd', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-ARM.tar.gz`, 'freebsd', 'arm')
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-ARM64.tar.gz`, 'freebsd', 'arm64')
.src(`${baseUrl}hugo_${hugoVersion}_Linux-32bit.tar.gz`, 'linux', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_Linux-ARM.tar.gz`, 'linux', 'arm')
.src(`${baseUrl}hugo_${hugoVersion}_Linux-ARM64.tar.gz`, 'linux', 'arm64')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-32bit.tar.gz`, 'darwin', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-64bit.tar.gz`, 'darwin', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-ARM64.tar.gz`, 'darwin', 'arm64')
.src(`${baseUrl}hugo_${hugoVersion}_NetBSD-32bit.tar.gz`, 'netbsd', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_NetBSD-64bit.tar.gz`, 'netbsd', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_NetBSD-ARM.tar.gz`, 'netbsd', 'arm')
.src(`${baseUrl}hugo_${hugoVersion}_OpenBSD-32bit.tar.gz`, 'openbsd', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_OpenBSD-64bit.tar.gz`, 'openbsd', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_OpenBSD-ARM.tar.gz`, 'openbsd', 'arm')
.src(`${baseUrl}hugo_${hugoVersion}_OpenBSD-ARM64.tar.gz`, 'openbsd', 'arm64')
.src(`${baseUrl}hugo_${hugoVersion}_Windows-32bit.zip`, 'win32', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
.dest(dest)
Expand Down

0 comments on commit d52698d

Please sign in to comment.