-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f30eb0
commit a183c10
Showing
5 changed files
with
63 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
php update-composer-config.php | ||
composer install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Accessibility Checker pluign file. | ||
* | ||
* @package Accessibility_Checker | ||
*/ | ||
|
||
// Check if running in GitHub Actions environment. | ||
$env = getenv( 'GITHUB_ACTIONS' ); | ||
|
||
$composer_json_path = 'composer.json'; | ||
$composer_config = json_decode( file_get_contents( $composer_json_path ), true ); | ||
Check warning on line 12 in update-composer-config.php GitHub Actions / Check code style
Check warning on line 12 in update-composer-config.php GitHub Actions / Check code style
|
||
|
||
if ( 'true' === $env ) { | ||
// Running in GitHub Actions environment. | ||
// Remove local specific packages for GitHub Actions environment. | ||
unset($composer_config['require-dev']['equalizedigital/accessibility-checker-wp-env']); | ||
Check failure on line 17 in update-composer-config.php GitHub Actions / Check code style
|
||
} else { | ||
// Not running in GitHub Actions, assuming local environment. | ||
// Add your local specific packages. | ||
$composer_config['require-dev']['equalizedigital/accessibility-checker-wp-env'] = '1.0.0'; | ||
} | ||
|
||
file_put_contents( $composer_json_path, json_encode( $composer_config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ); | ||
Check warning on line 24 in update-composer-config.php GitHub Actions / Check code style
Check warning on line 24 in update-composer-config.php GitHub Actions / Check code style
|
||
|