mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
commit
933abd531a
@ -17,7 +17,6 @@
|
|||||||
"camelcase": "off",
|
"camelcase": "off",
|
||||||
"require-atomic-updates": "off",
|
"require-atomic-updates": "off",
|
||||||
"@typescript-eslint/ban-ts-ignore": "off",
|
"@typescript-eslint/ban-ts-ignore": "off",
|
||||||
"@typescript-eslint/camelcase": "off",
|
"@typescript-eslint/camelcase": "off"
|
||||||
"@typescript-eslint/no-unused-vars": "off"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -68,7 +68,7 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
|
|||||||
|Windows Server 2019|`windows-latest` or `windows-2019`|
|
|Windows Server 2019|`windows-latest` or `windows-2019`|
|
||||||
|Ubuntu 18.04|`ubuntu-latest` or `ubuntu-18.04`|
|
|Ubuntu 18.04|`ubuntu-latest` or `ubuntu-18.04`|
|
||||||
|Ubuntu 16.04|`ubuntu-16.04`|
|
|Ubuntu 16.04|`ubuntu-16.04`|
|
||||||
|macOS X Catalina 10.15|`macos-latest` or `macOS-10.15`|
|
|macOS X Catalina 10.15|`macos-latest` or `macos-10.15`|
|
||||||
|
|
||||||
## :heavy_plus_sign: PHP Extension Support
|
## :heavy_plus_sign: PHP Extension Support
|
||||||
- On `ubuntu` by default extensions which are available as a package can be installed. PECL extensions if not available as a package can be installed by specifying `pecl` in the tools input.
|
- On `ubuntu` by default extensions which are available as a package can be installed. PECL extensions if not available as a package can be installed by specifying `pecl` in the tools input.
|
||||||
|
@ -3,12 +3,13 @@ import * as extensions from '../src/extensions';
|
|||||||
describe('Extension tests', () => {
|
describe('Extension tests', () => {
|
||||||
it('checking addExtensionOnWindows', async () => {
|
it('checking addExtensionOnWindows', async () => {
|
||||||
let win32: string = await extensions.addExtension(
|
let win32: string = await extensions.addExtension(
|
||||||
'xdebug, pcov, phalcon4, ast-beta, grpc-1.2.3, inotify-1.2.3alpha2',
|
'Xdebug, pcov, sqlite, phalcon4, ast-beta, grpc-1.2.3, inotify-1.2.3alpha2',
|
||||||
'7.4',
|
'7.4',
|
||||||
'win32'
|
'win32'
|
||||||
);
|
);
|
||||||
expect(win32).toContain('Add-Extension xdebug');
|
expect(win32).toContain('Add-Extension xdebug');
|
||||||
expect(win32).toContain('Add-Extension pcov');
|
expect(win32).toContain('Add-Extension pcov');
|
||||||
|
expect(win32).toContain('Add-Extension sqlite3');
|
||||||
expect(win32).toContain('phalcon.ps1 phalcon4');
|
expect(win32).toContain('phalcon.ps1 phalcon4');
|
||||||
expect(win32).toContain('Add-Extension ast beta');
|
expect(win32).toContain('Add-Extension ast beta');
|
||||||
expect(win32).toContain('Add-Extension grpc stable 1.2.3');
|
expect(win32).toContain('Add-Extension grpc stable 1.2.3');
|
||||||
@ -35,12 +36,15 @@ describe('Extension tests', () => {
|
|||||||
|
|
||||||
it('checking addExtensionOnLinux', async () => {
|
it('checking addExtensionOnLinux', async () => {
|
||||||
let linux: string = await extensions.addExtension(
|
let linux: string = await extensions.addExtension(
|
||||||
'xdebug, pcov, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3',
|
'Xdebug, pcov, sqlite, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3',
|
||||||
'7.4',
|
'7.4',
|
||||||
'linux'
|
'linux'
|
||||||
);
|
);
|
||||||
expect(linux).toContain('update_extension xdebug 2.9.1');
|
expect(linux).toContain('update_extension xdebug 2.9.2');
|
||||||
expect(linux).toContain('sudo $debconf_fix apt-get install -y php7.4-pcov');
|
expect(linux).toContain('sudo $debconf_fix apt-get install -y php7.4-pcov');
|
||||||
|
expect(linux).toContain(
|
||||||
|
'sudo $debconf_fix apt-get install -y php7.4-sqlite3'
|
||||||
|
);
|
||||||
expect(linux).toContain('add_unstable_extension ast beta extension');
|
expect(linux).toContain('add_unstable_extension ast beta extension');
|
||||||
expect(linux).toContain('add_pdo_extension mysql');
|
expect(linux).toContain('add_pdo_extension mysql');
|
||||||
expect(linux).toContain('add_pdo_extension odbc');
|
expect(linux).toContain('add_pdo_extension odbc');
|
||||||
@ -79,12 +83,13 @@ describe('Extension tests', () => {
|
|||||||
|
|
||||||
it('checking addExtensionOnDarwin', async () => {
|
it('checking addExtensionOnDarwin', async () => {
|
||||||
let darwin: string = await extensions.addExtension(
|
let darwin: string = await extensions.addExtension(
|
||||||
'xdebug, pcov, ast-beta, grpc-1.2.3',
|
'Xdebug, pcov, sqlite, ast-beta, grpc-1.2.3',
|
||||||
'7.2',
|
'7.2',
|
||||||
'darwin'
|
'darwin'
|
||||||
);
|
);
|
||||||
expect(darwin).toContain('sudo pecl install -f xdebug');
|
expect(darwin).toContain('sudo pecl install -f xdebug');
|
||||||
expect(darwin).toContain('sudo pecl install -f pcov');
|
expect(darwin).toContain('sudo pecl install -f pcov');
|
||||||
|
expect(darwin).toContain('sudo pecl install -f sqlite3');
|
||||||
expect(darwin).toContain('add_unstable_extension ast beta extension');
|
expect(darwin).toContain('add_unstable_extension ast beta extension');
|
||||||
expect(darwin).toContain('add_pecl_extension grpc 1.2.3 extension');
|
expect(darwin).toContain('add_pecl_extension grpc 1.2.3 extension');
|
||||||
|
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import * as path from 'path';
|
|
||||||
import * as fs from 'fs';
|
|
||||||
import * as matchers from '../src/matchers';
|
import * as matchers from '../src/matchers';
|
||||||
|
|
||||||
async function cleanup(path: string): Promise<void> {
|
|
||||||
fs.unlink(path, error => {
|
|
||||||
if (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
jest.mock('@actions/io');
|
jest.mock('@actions/io');
|
||||||
|
|
||||||
describe('Matchers', () => {
|
describe('Matchers', () => {
|
||||||
|
@ -55,12 +55,12 @@ describe('Utils tests', () => {
|
|||||||
path.join(__dirname, '../src/scripts/win32.ps1'),
|
path.join(__dirname, '../src/scripts/win32.ps1'),
|
||||||
'utf8'
|
'utf8'
|
||||||
);
|
);
|
||||||
expect(await utils.readScript('darwin.sh', '7.4', 'darwin')).toBe(darwin);
|
expect(await utils.readScript('darwin.sh')).toBe(darwin);
|
||||||
expect(await utils.readScript('darwin.sh', '7.3', 'darwin')).toBe(darwin);
|
expect(await utils.readScript('darwin.sh')).toBe(darwin);
|
||||||
expect(await utils.readScript('linux.sh', '7.4', 'linux')).toBe(linux);
|
expect(await utils.readScript('linux.sh')).toBe(linux);
|
||||||
expect(await utils.readScript('linux.sh', '7.3', 'linux')).toBe(linux);
|
expect(await utils.readScript('linux.sh')).toBe(linux);
|
||||||
expect(await utils.readScript('win32.ps1', '7.4', 'win32')).toBe(win32);
|
expect(await utils.readScript('win32.ps1')).toBe(win32);
|
||||||
expect(await utils.readScript('win32.ps1', '7.3', 'win32')).toBe(win32);
|
expect(await utils.readScript('win32.ps1')).toBe(win32);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('checking writeScripts', async () => {
|
it('checking writeScripts', async () => {
|
||||||
|
1843
dist/index.js
vendored
1843
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -9,4 +9,4 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
verbose: true,
|
verbose: true,
|
||||||
collectCoverage: true
|
collectCoverage: true
|
||||||
};
|
};
|
||||||
|
138
package-lock.json
generated
138
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -69,9 +69,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/generator": {
|
"@babel/generator": {
|
||||||
"version": "7.8.7",
|
"version": "7.8.8",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz",
|
||||||
"integrity": "sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew==",
|
"integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/types": "^7.8.7",
|
"@babel/types": "^7.8.7",
|
||||||
@ -198,9 +198,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/parser": {
|
"@babel/parser": {
|
||||||
"version": "7.8.7",
|
"version": "7.8.8",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz",
|
||||||
"integrity": "sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A==",
|
"integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@babel/plugin-syntax-bigint": {
|
"@babel/plugin-syntax-bigint": {
|
||||||
@ -294,9 +294,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -678,9 +678,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "13.9.0",
|
"version": "13.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz",
|
||||||
"integrity": "sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==",
|
"integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
@ -711,12 +711,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "2.22.0",
|
"version": "2.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.22.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz",
|
||||||
"integrity": "sha512-BvxRLaTDVQ3N+Qq8BivLiE9akQLAOUfxNHIEhedOcg8B2+jY8Rc4/D+iVprvuMX1AdezFYautuGDwr9QxqSxBQ==",
|
"integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/experimental-utils": "2.22.0",
|
"@typescript-eslint/experimental-utils": "2.23.0",
|
||||||
"eslint-utils": "^1.4.3",
|
"eslint-utils": "^1.4.3",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"regexpp": "^3.0.0",
|
"regexpp": "^3.0.0",
|
||||||
@ -724,32 +724,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "2.22.0",
|
"version": "2.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz",
|
||||||
"integrity": "sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==",
|
"integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/typescript-estree": "2.22.0",
|
"@typescript-eslint/typescript-estree": "2.23.0",
|
||||||
"eslint-scope": "^5.0.0"
|
"eslint-scope": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "2.22.0",
|
"version": "2.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.22.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz",
|
||||||
"integrity": "sha512-FaZKC1X+nvD7qMPqKFUYHz3H0TAioSVFGvG29f796Nc5tBluoqfHgLbSFKsh7mKjRoeTm8J9WX2Wo9EyZWjG7w==",
|
"integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-visitor-keys": "^1.0.0",
|
"@types/eslint-visitor-keys": "^1.0.0",
|
||||||
"@typescript-eslint/experimental-utils": "2.22.0",
|
"@typescript-eslint/experimental-utils": "2.23.0",
|
||||||
"@typescript-eslint/typescript-estree": "2.22.0",
|
"@typescript-eslint/typescript-estree": "2.23.0",
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "2.22.0",
|
"version": "2.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz",
|
||||||
"integrity": "sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==",
|
"integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
@ -790,9 +790,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"acorn": {
|
"acorn": {
|
||||||
"version": "6.4.0",
|
"version": "6.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
|
||||||
"integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==",
|
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1926,12 +1926,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"espree": {
|
"espree": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
|
||||||
"integrity": "sha512-Xs8airJ7RQolnDIbLtRutmfvSsAe0xqMMAantCN/GMoqf81TFbeI1T7Jpd56qYu1uuh32dOG5W/X9uO+ghPXzA==",
|
"integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"acorn": "^7.1.0",
|
"acorn": "^7.1.1",
|
||||||
"acorn-jsx": "^5.2.0",
|
"acorn-jsx": "^5.2.0",
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
}
|
}
|
||||||
@ -2395,9 +2395,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"version": "12.3.0",
|
"version": "12.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
|
||||||
"integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
|
"integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"type-fest": "^0.8.1"
|
"type-fest": "^0.8.1"
|
||||||
@ -2739,9 +2739,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"inquirer": {
|
"inquirer": {
|
||||||
"version": "7.0.6",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz",
|
||||||
"integrity": "sha512-7SVO4h+QIdMq6XcqIqrNte3gS5MzCCKZdsq9DO4PJziBFNYzP3PGFbDjgadDb//MCahzgjCxvQ/O2wa7kx9o4w==",
|
"integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-escapes": "^4.2.1",
|
"ansi-escapes": "^4.2.1",
|
||||||
@ -3682,9 +3682,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4430,9 +4430,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.4",
|
"version": "0.13.5",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
|
||||||
"integrity": "sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==",
|
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"regex-not": {
|
"regex-not": {
|
||||||
@ -4782,9 +4782,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"normalize-path": {
|
"normalize-path": {
|
||||||
@ -5506,6 +5506,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
|
},
|
||||||
|
"yargs-parser": {
|
||||||
|
"version": "16.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz",
|
||||||
|
"integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"camelcase": "^5.0.0",
|
||||||
|
"decamelize": "^1.2.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -5850,9 +5860,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "7.2.1",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz",
|
||||||
"integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==",
|
"integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"xml-name-validator": {
|
"xml-name-validator": {
|
||||||
@ -5874,18 +5884,18 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"yaml": {
|
"yaml": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.2.tgz",
|
||||||
"integrity": "sha512-6qI/tTx7OVtA4qNqD0OyutbM6Z9EKu4rxWm/2Y3FDEBQ4/2X2XAnyuRXMzAE2+1BPyqzksJZtrIwblOHg0IEzA==",
|
"integrity": "sha512-omakb0d7FjMo3R1D2EbTKVIk6dAVLRxFXdLZMEUToeAvuqgG/YuHMuQOZ5fgk+vQ8cx+cnGKwyg+8g8PNT0xQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.8.7"
|
"@babel/runtime": "^7.8.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "15.1.0",
|
"version": "15.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.0.tgz",
|
||||||
"integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==",
|
"integrity": "sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"cliui": "^6.0.0",
|
"cliui": "^6.0.0",
|
||||||
@ -5898,7 +5908,7 @@
|
|||||||
"string-width": "^4.2.0",
|
"string-width": "^4.2.0",
|
||||||
"which-module": "^2.0.0",
|
"which-module": "^2.0.0",
|
||||||
"y18n": "^4.0.0",
|
"y18n": "^4.0.0",
|
||||||
"yargs-parser": "^16.1.0"
|
"yargs-parser": "^18.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"find-up": {
|
"find-up": {
|
||||||
@ -5953,9 +5963,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
"version": "16.1.0",
|
"version": "18.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.0.tgz",
|
||||||
"integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==",
|
"integrity": "sha512-o/Jr6JBOv6Yx3pL+5naWSoIA2jJ+ZkMYQG/ie9qFbukBe4uzmBatlXFOiu/tNKRWEtyf+n5w7jc/O16ufqOTdQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase": "^5.0.0",
|
"camelcase": "^5.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Setup PHP for use with GitHub Actions",
|
"description": "Setup PHP for use with GitHub Actions",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -31,9 +31,9 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^25.1.4",
|
"@types/jest": "^25.1.4",
|
||||||
"@types/node": "^13.9.0",
|
"@types/node": "^13.9.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.22.0",
|
"@typescript-eslint/eslint-plugin": "^2.23.0",
|
||||||
"@typescript-eslint/parser": "^2.22.0",
|
"@typescript-eslint/parser": "^2.23.0",
|
||||||
"@zeit/ncc": "^0.21.1",
|
"@zeit/ncc": "^0.21.1",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-prettier": "^6.10.0",
|
"eslint-config-prettier": "^6.10.0",
|
||||||
|
@ -44,6 +44,7 @@ export async function addINIValuesWindows(
|
|||||||
*
|
*
|
||||||
* @param ini_values_csv
|
* @param ini_values_csv
|
||||||
* @param os_version
|
* @param os_version
|
||||||
|
* @param no_step
|
||||||
*/
|
*/
|
||||||
export async function addINIValues(
|
export async function addINIValues(
|
||||||
ini_values_csv: string,
|
ini_values_csv: string,
|
||||||
|
@ -16,18 +16,18 @@ export async function addExtensionDarwin(
|
|||||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||||
let script = '\n';
|
let script = '\n';
|
||||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||||
extension = extension.toLowerCase();
|
|
||||||
const version_extension: string = version + extension;
|
const version_extension: string = version + extension;
|
||||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||||
const prefix = await utils.getExtensionPrefix(ext_name);
|
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||||
let install_command = '';
|
const command_prefix = 'sudo pecl install -f ';
|
||||||
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
||||||
case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(
|
case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
install_command =
|
command =
|
||||||
'bash ' +
|
'bash ' +
|
||||||
path.join(__dirname, '../src/scripts/ext/blackfire_darwin.sh') +
|
path.join(__dirname, '../src/scripts/ext/blackfire_darwin.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
@ -35,7 +35,7 @@ export async function addExtensionDarwin(
|
|||||||
' ' +
|
' ' +
|
||||||
(await utils.getBlackfireVersion(ext_version));
|
(await utils.getBlackfireVersion(ext_version));
|
||||||
break;
|
break;
|
||||||
// match pre-release versions
|
// match pre-release versions. For example - xdebug-beta
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
@ -43,35 +43,54 @@ export async function addExtensionDarwin(
|
|||||||
' ' +
|
' ' +
|
||||||
ext_version +
|
ext_version +
|
||||||
' ' +
|
' ' +
|
||||||
prefix;
|
ext_prefix;
|
||||||
return;
|
return;
|
||||||
// match exact versions
|
// match semver
|
||||||
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
|
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_pecl_extension ' + ext_name + ' ' + ext_version + ' ' + prefix;
|
'\nadd_pecl_extension ' +
|
||||||
|
ext_name +
|
||||||
|
' ' +
|
||||||
|
ext_version +
|
||||||
|
' ' +
|
||||||
|
ext_prefix;
|
||||||
return;
|
return;
|
||||||
|
// match 5.3xdebug
|
||||||
case /5\.3xdebug/.test(version_extension):
|
case /5\.3xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install -f xdebug-2.2.7' + pipe;
|
command = command_prefix + 'xdebug-2.2.7' + pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 5.4xdebug
|
||||||
case /5\.4xdebug/.test(version_extension):
|
case /5\.4xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install -f xdebug-2.4.1' + pipe;
|
command = command_prefix + 'xdebug-2.4.1' + pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 5.5xdebug and 5.6xdebug
|
||||||
case /5\.[5-6]xdebug/.test(version_extension):
|
case /5\.[5-6]xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install -f xdebug-2.5.5' + pipe;
|
command = command_prefix + 'xdebug-2.5.5' + pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 7.0redis
|
||||||
case /7\.0xdebug/.test(version_extension):
|
case /7\.0xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install -f xdebug-2.9.0' + pipe;
|
command = command_prefix + 'xdebug-2.9.0' + pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 5.6redis
|
||||||
case /5\.6redis/.test(version_extension):
|
case /5\.6redis/.test(version_extension):
|
||||||
install_command = 'sudo pecl install -f redis-2.2.8' + pipe;
|
command = command_prefix + 'redis-2.2.8' + pipe;
|
||||||
break;
|
break;
|
||||||
case /[5-9]\.\dimagick/.test(version_extension):
|
// match imagick
|
||||||
install_command =
|
case /imagick/.test(extension):
|
||||||
|
command =
|
||||||
'brew install pkg-config imagemagick' +
|
'brew install pkg-config imagemagick' +
|
||||||
pipe +
|
pipe +
|
||||||
' && sudo pecl install -f imagick' +
|
' && ' +
|
||||||
|
command_prefix +
|
||||||
|
'imagick' +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
break;
|
||||||
|
// match sqlite
|
||||||
|
case /sqlite/.test(extension):
|
||||||
|
extension = 'sqlite3';
|
||||||
|
command = command_prefix + extension + pipe;
|
||||||
|
break;
|
||||||
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'sh ' +
|
'sh ' +
|
||||||
@ -82,16 +101,11 @@ export async function addExtensionDarwin(
|
|||||||
version;
|
version;
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
install_command = 'sudo pecl install -f ' + extension + pipe;
|
command = command_prefix + extension + pipe;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
script +=
|
script +=
|
||||||
'\nadd_extension ' +
|
'\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix;
|
||||||
extension +
|
|
||||||
' "' +
|
|
||||||
install_command +
|
|
||||||
'" ' +
|
|
||||||
(await utils.getExtensionPrefix(extension));
|
|
||||||
});
|
});
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
@ -101,17 +115,14 @@ export async function addExtensionDarwin(
|
|||||||
*
|
*
|
||||||
* @param extension_csv
|
* @param extension_csv
|
||||||
* @param version
|
* @param version
|
||||||
* @param pipe
|
|
||||||
*/
|
*/
|
||||||
export async function addExtensionWindows(
|
export async function addExtensionWindows(
|
||||||
extension_csv: string,
|
extension_csv: string,
|
||||||
version: string,
|
version: string
|
||||||
pipe: string
|
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||||
let script = '\n';
|
let script = '\n';
|
||||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||||
extension = extension.toLowerCase();
|
|
||||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||||
const version_extension: string = version + extension;
|
const version_extension: string = version + extension;
|
||||||
let matches: RegExpExecArray;
|
let matches: RegExpExecArray;
|
||||||
@ -129,23 +140,29 @@ export async function addExtensionWindows(
|
|||||||
' ' +
|
' ' +
|
||||||
(await utils.getBlackfireVersion(ext_version));
|
(await utils.getBlackfireVersion(ext_version));
|
||||||
return;
|
return;
|
||||||
// match pre-release versions
|
// match pre-release versions. For example - xdebug-beta
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
||||||
script += '\nAdd-Extension ' + ext_name + ' ' + ext_version;
|
script += '\nAdd-Extension ' + ext_name + ' ' + ext_version;
|
||||||
break;
|
break;
|
||||||
// match exact versions
|
// match semver without state
|
||||||
case /.*-\d+\.\d+\.\d+$/.test(version_extension):
|
case /.*-\d+\.\d+\.\d+$/.test(version_extension):
|
||||||
script += '\nAdd-Extension ' + ext_name + ' stable ' + ext_version;
|
script += '\nAdd-Extension ' + ext_name + ' stable ' + ext_version;
|
||||||
return;
|
return;
|
||||||
case /.*-(\d+\.\d+\.\d)+(beta|alpha|devel|snapshot)\d*/.test(
|
// match semver with state
|
||||||
|
case /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
matches = /.*-(\d+\.\d+\.\d)+(beta|alpha|devel|snapshot)\d*/.exec(
|
matches = /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.exec(
|
||||||
version_extension
|
version_extension
|
||||||
) as RegExpExecArray;
|
) as RegExpExecArray;
|
||||||
script +=
|
script +=
|
||||||
'\nAdd-Extension ' + ext_name + ' ' + matches[2] + ' ' + matches[1];
|
'\nAdd-Extension ' + ext_name + ' ' + matches[2] + ' ' + matches[1];
|
||||||
return;
|
return;
|
||||||
|
// match sqlite
|
||||||
|
case /sqlite/.test(extension):
|
||||||
|
extension = 'sqlite3';
|
||||||
|
script += '\nAdd-Extension ' + extension;
|
||||||
|
break;
|
||||||
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
@ -180,18 +197,18 @@ export async function addExtensionLinux(
|
|||||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||||
let script = '\n';
|
let script = '\n';
|
||||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||||
extension = extension.toLowerCase();
|
|
||||||
const version_extension: string = version + extension;
|
const version_extension: string = version + extension;
|
||||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||||
const prefix = await utils.getExtensionPrefix(ext_name);
|
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||||
let install_command = '';
|
const command_prefix = 'sudo $debconf_fix apt-get install -y php';
|
||||||
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
||||||
case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(
|
case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
install_command =
|
command =
|
||||||
'bash ' +
|
'bash ' +
|
||||||
path.join(__dirname, '../src/scripts/ext/blackfire.sh') +
|
path.join(__dirname, '../src/scripts/ext/blackfire.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
@ -199,7 +216,7 @@ export async function addExtensionLinux(
|
|||||||
' ' +
|
' ' +
|
||||||
(await utils.getBlackfireVersion(ext_version));
|
(await utils.getBlackfireVersion(ext_version));
|
||||||
break;
|
break;
|
||||||
// match pre-release versions
|
// match pre-release versions. For example - xdebug-beta
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
@ -207,16 +224,21 @@ export async function addExtensionLinux(
|
|||||||
' ' +
|
' ' +
|
||||||
ext_version +
|
ext_version +
|
||||||
' ' +
|
' ' +
|
||||||
prefix;
|
ext_prefix;
|
||||||
return;
|
return;
|
||||||
// match exact versions
|
// match semver versions
|
||||||
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
|
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_pecl_extension ' + ext_name + ' ' + ext_version + ' ' + prefix;
|
'\nadd_pecl_extension ' +
|
||||||
|
ext_name +
|
||||||
|
' ' +
|
||||||
|
ext_version +
|
||||||
|
' ' +
|
||||||
|
ext_prefix;
|
||||||
return;
|
return;
|
||||||
// match 5.6gearman..7.4gearman
|
// match 5.6gearman..7.4gearman
|
||||||
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
|
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
|
||||||
install_command =
|
command =
|
||||||
'sh ' +
|
'sh ' +
|
||||||
path.join(__dirname, '../src/scripts/ext/gearman.sh') +
|
path.join(__dirname, '../src/scripts/ext/gearman.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
@ -236,28 +258,27 @@ export async function addExtensionLinux(
|
|||||||
// match 7.0xdebug..7.4xdebug
|
// match 7.0xdebug..7.4xdebug
|
||||||
case /^7\.[0-4]xdebug$/.test(version_extension):
|
case /^7\.[0-4]xdebug$/.test(version_extension):
|
||||||
script +=
|
script +=
|
||||||
'\nupdate_extension xdebug 2.9.1' +
|
'\nupdate_extension xdebug 2.9.2' +
|
||||||
pipe +
|
pipe +
|
||||||
'\n' +
|
'\n' +
|
||||||
(await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux'));
|
(await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux'));
|
||||||
return;
|
return;
|
||||||
// match pdo extensions
|
// match pdo extensions
|
||||||
case /.*pdo[_-].*/.test(version_extension):
|
case /.*pdo[_-].*/.test(version_extension):
|
||||||
script +=
|
extension = extension.replace('pdo_', '').replace('pdo-', '');
|
||||||
'\nadd_pdo_extension ' +
|
script += '\nadd_pdo_extension ' + extension;
|
||||||
extension.replace('pdo_', '').replace('pdo-', '');
|
|
||||||
return;
|
return;
|
||||||
|
// match sqlite
|
||||||
|
case /sqlite/.test(extension):
|
||||||
|
extension = 'sqlite3';
|
||||||
|
command = command_prefix + version + '-' + extension + pipe;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
install_command =
|
command = command_prefix + version + '-' + extension + pipe;
|
||||||
'sudo $debconf_fix apt-get install -y php' +
|
|
||||||
version +
|
|
||||||
'-' +
|
|
||||||
extension +
|
|
||||||
pipe;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
script +=
|
script +=
|
||||||
'\nadd_extension ' + extension + ' "' + install_command + '" ' + prefix;
|
'\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix;
|
||||||
});
|
});
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
@ -268,7 +289,7 @@ export async function addExtensionLinux(
|
|||||||
* @param extension_csv
|
* @param extension_csv
|
||||||
* @param version
|
* @param version
|
||||||
* @param os_version
|
* @param os_version
|
||||||
* @param log_prefix
|
* @param no_step
|
||||||
*/
|
*/
|
||||||
export async function addExtension(
|
export async function addExtension(
|
||||||
extension_csv: string,
|
extension_csv: string,
|
||||||
@ -290,7 +311,7 @@ export async function addExtension(
|
|||||||
|
|
||||||
switch (os_version) {
|
switch (os_version) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return script + (await addExtensionWindows(extension_csv, version, pipe));
|
return script + (await addExtensionWindows(extension_csv, version));
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return script + (await addExtensionDarwin(extension_csv, version, pipe));
|
return script + (await addExtensionDarwin(extension_csv, version, pipe));
|
||||||
case 'linux':
|
case 'linux':
|
||||||
|
@ -35,7 +35,7 @@ export async function build(
|
|||||||
tools_csv = 'pecl, ' + tools_csv;
|
tools_csv = 'pecl, ' + tools_csv;
|
||||||
}
|
}
|
||||||
|
|
||||||
let script: string = await utils.readScript(filename, version, os_version);
|
let script: string = await utils.readScript(filename);
|
||||||
script += await tools.addTools(tools_csv, version, os_version);
|
script += await tools.addTools(tools_csv, version, os_version);
|
||||||
|
|
||||||
if (extension_csv) {
|
if (extension_csv) {
|
||||||
|
15
src/tools.ts
15
src/tools.ts
@ -4,6 +4,7 @@ import * as utils from './utils';
|
|||||||
* Function to get command to setup tools
|
* Function to get command to setup tools
|
||||||
*
|
*
|
||||||
* @param os_version
|
* @param os_version
|
||||||
|
* @param suffix
|
||||||
*/
|
*/
|
||||||
export async function getCommand(
|
export async function getCommand(
|
||||||
os_version: string,
|
os_version: string,
|
||||||
@ -69,6 +70,8 @@ export async function parseTool(
|
|||||||
/**
|
/**
|
||||||
* Function to get the url of tool with the given version
|
* Function to get the url of tool with the given version
|
||||||
*
|
*
|
||||||
|
* @param tool
|
||||||
|
* @param extension
|
||||||
* @param version
|
* @param version
|
||||||
* @param prefix
|
* @param prefix
|
||||||
* @param version_prefix
|
* @param version_prefix
|
||||||
@ -167,16 +170,14 @@ export async function getCodeceptionUri(
|
|||||||
case /(^2\.(1\.[0-5]|0\.\d+)|^1\.[6-8]\.\d+).*/.test(version):
|
case /(^2\.(1\.[0-5]|0\.\d+)|^1\.[6-8]\.\d+).*/.test(version):
|
||||||
return codecept;
|
return codecept;
|
||||||
default:
|
default:
|
||||||
return await codecept;
|
return codecept;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to get script to setup phive
|
* Helper function to get script to setup phive
|
||||||
*
|
*
|
||||||
* @param tool
|
|
||||||
* @param version
|
* @param version
|
||||||
* @param url
|
|
||||||
* @param os_version
|
* @param os_version
|
||||||
*/
|
*/
|
||||||
export async function addPhive(
|
export async function addPhive(
|
||||||
@ -204,6 +205,9 @@ export async function addPhive(
|
|||||||
/**
|
/**
|
||||||
* Function to get the phar url in domain/tool-version.phar format
|
* Function to get the phar url in domain/tool-version.phar format
|
||||||
*
|
*
|
||||||
|
* @param domain
|
||||||
|
* @param tool
|
||||||
|
* @param prefix
|
||||||
* @param version
|
* @param version
|
||||||
*/
|
*/
|
||||||
export async function getPharUrl(
|
export async function getPharUrl(
|
||||||
@ -293,7 +297,7 @@ export async function getWpCliUrl(version: string): Promise<string> {
|
|||||||
/**
|
/**
|
||||||
* Function to add/move composer in the tools list
|
* Function to add/move composer in the tools list
|
||||||
*
|
*
|
||||||
* @param tools
|
* @param tools_list
|
||||||
*/
|
*/
|
||||||
export async function addComposer(tools_list: string[]): Promise<string[]> {
|
export async function addComposer(tools_list: string[]): Promise<string[]> {
|
||||||
const regex = /^composer($|:.*)/;
|
const regex = /^composer($|:.*)/;
|
||||||
@ -402,7 +406,8 @@ export async function addPackage(
|
|||||||
/**
|
/**
|
||||||
* Setup tools
|
* Setup tools
|
||||||
*
|
*
|
||||||
* @param tool_csv
|
* @param tools_csv
|
||||||
|
* @param php_version
|
||||||
* @param os_version
|
* @param os_version
|
||||||
*/
|
*/
|
||||||
export async function addTools(
|
export async function addTools(
|
||||||
|
12
src/utils.ts
12
src/utils.ts
@ -65,7 +65,6 @@ export async function color(type: string): Promise<string> {
|
|||||||
* @param message
|
* @param message
|
||||||
* @param os_version
|
* @param os_version
|
||||||
* @param log_type
|
* @param log_type
|
||||||
* @param prefix
|
|
||||||
*/
|
*/
|
||||||
export async function log(
|
export async function log(
|
||||||
message: string,
|
message: string,
|
||||||
@ -121,6 +120,7 @@ export async function stepLog(
|
|||||||
* @param mark
|
* @param mark
|
||||||
* @param subject
|
* @param subject
|
||||||
* @param message
|
* @param message
|
||||||
|
* @param os_version
|
||||||
*/
|
*/
|
||||||
export async function addLog(
|
export async function addLog(
|
||||||
mark: string,
|
mark: string,
|
||||||
@ -147,14 +147,8 @@ export async function addLog(
|
|||||||
* Read the scripts
|
* Read the scripts
|
||||||
*
|
*
|
||||||
* @param filename
|
* @param filename
|
||||||
* @param version
|
|
||||||
* @param os_version
|
|
||||||
*/
|
*/
|
||||||
export async function readScript(
|
export async function readScript(filename: string): Promise<string> {
|
||||||
filename: string,
|
|
||||||
version: string,
|
|
||||||
os_version: string
|
|
||||||
): Promise<string> {
|
|
||||||
return fs.readFileSync(
|
return fs.readFileSync(
|
||||||
path.join(__dirname, '../src/scripts/' + filename),
|
path.join(__dirname, '../src/scripts/' + filename),
|
||||||
'utf8'
|
'utf8'
|
||||||
@ -165,7 +159,6 @@ export async function readScript(
|
|||||||
* Write final script which runs
|
* Write final script which runs
|
||||||
*
|
*
|
||||||
* @param filename
|
* @param filename
|
||||||
* @param version
|
|
||||||
* @param script
|
* @param script
|
||||||
*/
|
*/
|
||||||
export async function writeScript(
|
export async function writeScript(
|
||||||
@ -196,6 +189,7 @@ export async function extensionArray(
|
|||||||
.map(function(extension: string) {
|
.map(function(extension: string) {
|
||||||
return extension
|
return extension
|
||||||
.trim()
|
.trim()
|
||||||
|
.toLowerCase()
|
||||||
.replace('php-', '')
|
.replace('php-', '')
|
||||||
.replace('php_', '');
|
.replace('php_', '');
|
||||||
})
|
})
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
/* Basic Options */
|
/* Basic Options */
|
||||||
// "incremental": true, /* Enable incremental compilation */
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
|
Loading…
Reference in New Issue
Block a user