Jelajahi Sumber

tech(build): dont override arch for windows

bergquist 9 tahun lalu
induk
melakukan
75a1ff1037
1 mengubah file dengan 8 tambahan dan 4 penghapusan
  1. 8 4
      Gruntfile.js

+ 8 - 4
Gruntfile.js

@@ -12,12 +12,16 @@ module.exports = function (grunt) {
     platform: process.platform.replace('win32', 'windows'),
   };
 
-  if (process.platform.match(/^win/)) {
-    config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
+  if (grunt.option('arch')) {
+    config.arch = grunt.option('arch')
+  } else {
+    config.arch = os.arch()
+
+    if (process.platform.match(/^win/)) {
+      config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
+    }
   }
 
-  config.arch = grunt.option('arch') || os.arch();
-
   config.phjs = grunt.option('phjsToRelease');
 
   config.pkg.version = grunt.option('pkgVer') || config.pkg.version;