Skip to content

Commit

Permalink
Bump version to 2.14.0
Browse files Browse the repository at this point in the history
Add config to generate types

Fix build error in install.ts after TypeScript upgrade

Minor refactor in install.test.ts

Add bugs, directories, files and types entries in package.json

Update Node.js dependencies

Update SECURITY.md
  • Loading branch information
shivammathur committed Sep 10, 2021
1 parent 35bc046 commit a34eeed
Show file tree
Hide file tree
Showing 7 changed files with 790 additions and 753 deletions.
3 changes: 2 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The following versions of this project are supported for security updates.
| Version | Supported |
| ------- | ------------------ |
| 1.11.x | :white_check_mark: |
| 2.11.x | :white_check_mark: |
| 2.14.x | :white_check_mark: |

## Supported PHP Versions

Expand All @@ -18,6 +18,7 @@ This security policy only applies to the latest patches of the following PHP ver
| 7.3 | :white_check_mark: |
| 7.4 | :white_check_mark: |
| 8.0 | :white_check_mark: |
| 8.1 | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
22 changes: 4 additions & 18 deletions __tests__/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,11 @@ jest.mock('../src/install', () => ({
const ini_values_csv: string = process.env['ini-values'] || '';
const coverage_driver: string = process.env['coverage'] || '';
let tools_csv: string = process.env['tools'] || '';
const pecl: string = process.env['pecl'] || '';
if (pecl == 'true') {
tools_csv = 'pecl, ' + tools_csv;
}

let script = 'initial script ' + filename + version + os_version;
if (tools_csv) {
script += 'add_tool';
}
if (extension_csv) {
script += 'install extensions';
}
if (coverage_driver) {
script += 'set coverage driver';
}
if (ini_values_csv) {
script += 'edit php.ini';
}

script += tools_csv ? 'add_tool' : '';
script += extension_csv ? 'install extensions' : '';
script += coverage_driver ? 'set coverage driver' : '';
script += ini_values_csv ? 'edit php.ini' : '';
return script;
}
),
Expand Down
9 changes: 4 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ const extensions = __importStar(__nccwpck_require__(390));
const tools = __importStar(__nccwpck_require__(740));
const utils = __importStar(__nccwpck_require__(918));
async function getScript(filename, version, os_version) {
const name = 'setup-php';
const url = 'https://setup-php.com/support';
const url = 'https://setup-php.com/sponsor';
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
const extension_csv = await utils.getInput('extensions', false);
const ini_values_csv = await utils.getInput('ini-values', false);
Expand All @@ -442,8 +441,8 @@ async function getScript(filename, version, os_version) {
if (ini_values_csv) {
script += await config.addINIValues(ini_values_csv, os_version);
}
script += '\n' + (await utils.stepLog('Support this project', os_version));
script += '\n' + (await utils.addLog('$tick', name, url, os_version));
script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os_version));
script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os_version));
return await utils.writeScript(filename, script);
}
exports.getScript = getScript;
Expand All @@ -459,7 +458,7 @@ async function run() {
const tool = await utils.scriptTool(os_version);
const script = os_version + (await utils.scriptExtension(os_version));
const location = await getScript(script, version, os_version);
await exec_1.exec(await utils.joins(tool, location, version, __dirname));
await (0, exec_1.exec)(await utils.joins(tool, location, version, __dirname));
}
else {
core.setFailed('Unable to get the PHP version');
Expand Down
Loading

0 comments on commit a34eeed

Please sign in to comment.