From 5bddf79d097a05121369337f7c622b101ff94d3e Mon Sep 17 00:00:00 2001 From: Torkel Odegaard Date: Tue, 21 Apr 2015 08:56:32 +0200 Subject: [PATCH] Correctly determine arch for windows builds --- Gruntfile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9303913733d..43cb1f09bd1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,6 @@ /* jshint node:true */ 'use strict'; module.exports = function (grunt) { - var os = require('os'); var config = { pkg: grunt.file.readJSON('package.json'), @@ -13,6 +12,10 @@ module.exports = function (grunt) { platform: process.platform.replace('win32', 'windows'), }; + if (process.platform.match(/^win/)) { + config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86'; + } + config.pkg.version = grunt.option('pkgVer') || config.pkg.version; // load plugins @@ -35,7 +38,6 @@ module.exports = function (grunt) { // Merge that object with what with whatever we have here loadConfig(config,'./tasks/options/'); - // pass the config to grunt grunt.initConfig(config); };