1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-04-27 02:18:27 -04:00
hugo-extended/lib/binary.js

15 lines
531 B
JavaScript

const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkgConf = require('pkg-conf');
const getBinalyName = require('./getBinalyName');
const hugoVersion = pkgConf.sync('hugoBin').hugoVersion;
const baseUrl = `https://github.com/spf13/hugo/releases/download/v${hugoVersion}/`;
const binalyNames = getBinalyName(hugoVersion, process.platform, process.arch);
module.exports = new BinWrapper()
.src(`${baseUrl}${binalyNames.comp}`)
.dest(path.join(__dirname, '../vendor'))
.use(`${binalyNames.exe}`);