@scandipwa/magento-scripts 1.13.0-alpha.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,19 +10,41 @@ const compileOptions = require('../php/compile-options');
|
|
|
10
10
|
const latestStablePHP74 = '7.4.27';
|
|
11
11
|
const phpbrewPHPName = `php-${latestStablePHP74}-phpbrew`;
|
|
12
12
|
|
|
13
|
+
const compileOptionsForPhp = {
|
|
14
|
+
linux: {
|
|
15
|
+
...compileOptions.linux,
|
|
16
|
+
variants: [
|
|
17
|
+
'+default'
|
|
18
|
+
],
|
|
19
|
+
extraOptions: []
|
|
20
|
+
},
|
|
21
|
+
darwin: {
|
|
22
|
+
...compileOptions.darwin,
|
|
23
|
+
variants: [
|
|
24
|
+
'+default',
|
|
25
|
+
'+openssl=$(brew --prefix openssl@1.1)'
|
|
26
|
+
],
|
|
27
|
+
extraOptions: []
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
13
31
|
/**
|
|
14
32
|
* @type {() => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
|
|
15
33
|
*/
|
|
16
34
|
const installPHPForPHPBrew = () => ({
|
|
17
35
|
title: `Installing PHP ${latestStablePHP74} for PHPBrew...`,
|
|
18
36
|
task: async (ctx, task) => {
|
|
19
|
-
const platformCompileOptions =
|
|
37
|
+
const platformCompileOptions = compileOptionsForPhp[process.platform];
|
|
20
38
|
|
|
21
39
|
if (!await pathExists(path.join(phpbrewConfig.phpPath, `${phpbrewPHPName}`, 'bin'))) {
|
|
40
|
+
const commandEnv = Object.entries(platformCompileOptions.env || {}).map(([key, value]) => `${key}="${value}"`).join(' ');
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line max-len
|
|
43
|
+
const compileCommand = `${commandEnv ? `${commandEnv} && ` : ''}phpbrew install -j ${platformCompileOptions.cpuCount} ${latestStablePHP74} as ${phpbrewPHPName} ${platformCompileOptions.variants.join(' ')}`;
|
|
44
|
+
|
|
22
45
|
try {
|
|
23
46
|
await execAsyncSpawn(
|
|
24
|
-
|
|
25
|
-
`phpbrew install -j ${platformCompileOptions.cpuCount} ${latestStablePHP74} as ${phpbrewPHPName}`,
|
|
47
|
+
compileCommand,
|
|
26
48
|
{
|
|
27
49
|
callback: (t) => {
|
|
28
50
|
task.output = t;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Scripts and configuration used by CMA.",
|
|
4
4
|
"homepage": "https://docs.create-magento-app.com/",
|
|
5
5
|
"repository": "github:scandipwa/create-magento-app",
|
|
6
|
-
"version": "1.13.0
|
|
6
|
+
"version": "1.13.0",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./typings/index.d.ts",
|
|
9
9
|
"license": "OSL-3.0",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ea9caf4db8672b0cf197e49cd4c9002eea84a113"
|
|
46
46
|
}
|