1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-07-03 13:26:38 -04:00

feat(hugo): upgrade Hugo to v0.20.7 (#18)

This commit is contained in:
Shun Sato
2017-05-05 20:22:07 +09:00
committed by GitHub
parent d12ff8485d
commit b1dfe8d0ba
3 changed files with 18 additions and 17 deletions

View File

@ -46,6 +46,7 @@ See the [Hugo Documentation](https://gohugo.io/) for more information.
| hugo-bin version | Hugo version |
|:-----------------:|:------------:|
| ^0.7.0 | v0.20.7 |
| ^0.6.0 | v0.19 |
| ^0.5.0 | v0.18.1 |
| ^0.4.0 | v0.17 |

View File

@ -6,35 +6,35 @@ const hugoVersion = pkg.hugoVersion;
const baseUrl = `https://github.com/spf13/hugo/releases/download/v${hugoVersion}/`;
const binNameMap = {
darwin: {
ia32: `hugo_${hugoVersion}_darwin_386`,
x64: `hugo_${hugoVersion}_darwin_amd64`
ia32: 'hugo',
x64: 'hugo'
},
freebsd: {
arm: `hugo_${hugoVersion}_freebsd_arm`,
ia32: `hugo_${hugoVersion}_freebsd_386`,
x64: `hugo_${hugoVersion}_freebsd_amd64`
arm: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
linux: {
arm: `hugo_${hugoVersion}_linux_arm`,
ia32: `hugo_${hugoVersion}_linux_386`,
x64: `hugo_${hugoVersion}_linux_amd64`
arm: 'hugo',
ia32: 'hugo',
x64: 'hugo'
},
win32: {
ia32: `hugo_${hugoVersion}_windows_386.exe`,
x64: `hugo_${hugoVersion}_windows_amd64.exe`
ia32: 'hugo.exe',
x64: 'hugo.exe'
}
};
const binName = (binNameMap[process.platform] && binNameMap[process.platform][process.arch]) || '';
module.exports = new BinWrapper()
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-32bit.zip`, 'freebsd', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-64bit.zip`, 'freebsd', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD_ARM.zip`, 'freebsd', 'arm')
.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}_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}_macOS-32bit.zip`, 'darwin', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-64bit.zip`, 'darwin', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_Linux-ARM.tar.gz`, 'linux', 'arm')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-32bit.tar.gz`, 'darwin', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_macOS-64bit.tar.gz`, 'darwin', 'x64')
.src(`${baseUrl}hugo_${hugoVersion}_Windows-32bit.zip`, 'win32', 'x86')
.src(`${baseUrl}hugo_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
.dest(path.join(__dirname, '../vendor'))

View File

@ -1,7 +1,7 @@
{
"name": "hugo-bin",
"version": "0.6.1",
"hugoVersion": "0.19",
"hugoVersion": "0.20.7",
"description": "Binary wrapper for Hugo",
"main": "index.js",
"scripts": {