Correctly determine arch for windows builds

This commit is contained in:
Torkel Odegaard 2015-04-21 08:56:32 +02:00
parent 05bed2fd8a
commit 5bddf79d09

View File

@ -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);
};