diff --git a/Makefile b/Makefile index 206e874..259a5db 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,9 @@ migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-make-sure-etc-is-ran-through-phpcs: #### Make sure PHPCS runs through etc ##*I*## ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "../../etc") !== false) {exit;} $$xml = str_replace("../../src", "../../etc\n ../../src", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) +migrations-php-composer-require-checker-create-config-if-not-exists: #### Create Composer Require Checker config file if it doesn't exists at etc/qa/composer-require-checker.json ##*I*## + ($(DOCKER_RUN) php -r '$$composerRequireCheckerConfigFile = "etc/qa/composer-require-checker.json"; $$composerRequireCheckerConfig = base64_decode("ewogICJzeW1ib2wtd2hpdGVsaXN0IiA6IFsKICAgICJudWxsIiwgInRydWUiLCAiZmFsc2UiLAogICAgInN0YXRpYyIsICJzZWxmIiwgInBhcmVudCIsCiAgICAiYXJyYXkiLCAic3RyaW5nIiwgImludCIsICJmbG9hdCIsICJib29sIiwgIml0ZXJhYmxlIiwgImNhbGxhYmxlIiwgInZvaWQiLCAib2JqZWN0IiwKICAgICJDb21wb3NlclxcQ29tcG9zZXIiLCAiQ29tcG9zZXJcXENvbmZpZyIsICJDb21wb3NlclxcRXZlbnREaXNwYXRjaGVyXFxFdmVudFN1YnNjcmliZXJJbnRlcmZhY2UiLAogICAgIkNvbXBvc2VyXFxJT1xcSU9JbnRlcmZhY2UiLCAiQ29tcG9zZXJcXFBhY2thZ2VcXFJvb3RQYWNrYWdlSW50ZXJmYWNlIiwgIkNvbXBvc2VyXFxQbHVnaW5cXFBsdWdpbkludGVyZmFjZSIsCiAgICAiQ29tcG9zZXJcXFNjcmlwdFxcRXZlbnQiLCAiQ29tcG9zZXJcXFNjcmlwdFxcU2NyaXB0RXZlbnRzIgogIF0sCiAgInBocC1jb3JlLWV4dGVuc2lvbnMiIDogWwogICAgIkNvcmUiLAogICAgImRhdGUiLAogICAgInBjcmUiLAogICAgIlBoYXIiLAogICAgIlJlZmxlY3Rpb24iLAogICAgIlNQTCIsCiAgICAic3RhbmRhcmQiCiAgXSwKICAic2Nhbi1maWxlcyIgOiBbXQp9Cg=="); if (file_exists($$composerRequireCheckerConfigFile)) {exit;} file_put_contents($$composerRequireCheckerConfigFile, $$composerRequireCheckerConfig);' || true) + migrations-github-codeowners: #### Ensure a CODEOWNERS file is present, create only if it doesn't exist yet ##*I*## ($(DOCKER_RUN) php -r '$$codeOwnersFile = ".github/CODEOWNERS"; if (file_exists($$codeOwnersFile)) {exit;} file_put_contents($$codeOwnersFile, "* @WyriHaximus" . PHP_EOL);' || true) diff --git a/includes/PHP.Migrations.mk b/includes/PHP.Migrations.mk index 525383d..90e4292 100644 --- a/includes/PHP.Migrations.mk +++ b/includes/PHP.Migrations.mk @@ -60,3 +60,6 @@ migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-make-sure-etc-is-ran-through-phpcs: #### Make sure PHPCS runs through etc ##*I*## ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "../../etc") !== false) {exit;} $$xml = str_replace("../../src", "../../etc\n ../../src", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-composer-require-checker-create-config-if-not-exists: #### Create Composer Require Checker config file if it doesn't exists at etc/qa/composer-require-checker.json ##*I*## + ($(DOCKER_RUN) php -r '$$composerRequireCheckerConfigFile = "etc/qa/composer-require-checker.json"; $$composerRequireCheckerConfig = base64_decode("ewogICJzeW1ib2wtd2hpdGVsaXN0IiA6IFsKICAgICJudWxsIiwgInRydWUiLCAiZmFsc2UiLAogICAgInN0YXRpYyIsICJzZWxmIiwgInBhcmVudCIsCiAgICAiYXJyYXkiLCAic3RyaW5nIiwgImludCIsICJmbG9hdCIsICJib29sIiwgIml0ZXJhYmxlIiwgImNhbGxhYmxlIiwgInZvaWQiLCAib2JqZWN0IiwKICAgICJDb21wb3NlclxcQ29tcG9zZXIiLCAiQ29tcG9zZXJcXENvbmZpZyIsICJDb21wb3NlclxcRXZlbnREaXNwYXRjaGVyXFxFdmVudFN1YnNjcmliZXJJbnRlcmZhY2UiLAogICAgIkNvbXBvc2VyXFxJT1xcSU9JbnRlcmZhY2UiLCAiQ29tcG9zZXJcXFBhY2thZ2VcXFJvb3RQYWNrYWdlSW50ZXJmYWNlIiwgIkNvbXBvc2VyXFxQbHVnaW5cXFBsdWdpbkludGVyZmFjZSIsCiAgICAiQ29tcG9zZXJcXFNjcmlwdFxcRXZlbnQiLCAiQ29tcG9zZXJcXFNjcmlwdFxcU2NyaXB0RXZlbnRzIgogIF0sCiAgInBocC1jb3JlLWV4dGVuc2lvbnMiIDogWwogICAgIkNvcmUiLAogICAgImRhdGUiLAogICAgInBjcmUiLAogICAgIlBoYXIiLAogICAgIlJlZmxlY3Rpb24iLAogICAgIlNQTCIsCiAgICAic3RhbmRhcmQiCiAgXSwKICAic2Nhbi1maWxlcyIgOiBbXQp9Cg=="); if (file_exists($$composerRequireCheckerConfigFile)) {exit;} file_put_contents($$composerRequireCheckerConfigFile, $$composerRequireCheckerConfig);' || true)