forked from wpengine/frost
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from linchpin/merge/upstream
Merge/upstream
- Loading branch information
Showing
120 changed files
with
2,950 additions
and
8,710 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* This file cleans up some odds and ends things prior to release | ||
* | ||
* @since 1.0.0 Make sure debug config lines are set to false by default | ||
*/ | ||
|
||
echo "➤ Forcing debug config off\n\r"; | ||
|
||
// Read the elite plugin file into a string | ||
$elite_plugin_file = file_get_contents('./linchpin-com-functionality.php' ); | ||
|
||
// Make sure a release does not have hardcoded debug lines set to true. | ||
$configs = [ | ||
'ASH_DEBUG', | ||
'ASH_DEV_MODE', | ||
]; | ||
|
||
$errors_found = 0; | ||
|
||
foreach ( $configs as $config ) { | ||
if ( false !== strpos( $elite_plugin_file, "define( '$config', true );" ) ) { | ||
$elite_plugin_file = str_replace( "define( '$config', true );", "define( '$config', false );", $elite_plugin_file ); | ||
|
||
echo esc_html( "\e[31m➤ Doing it wrong:\e[36m $config \e[0mhas been updated to false, you should set these configs outside the plugin!\n\r" ); | ||
$errors_found++; | ||
} | ||
} | ||
|
||
if ( empty( $errors_found ) ) { | ||
echo "\e[32m➤ No debug configs found\n\r"; | ||
} | ||
|
||
// Write our new file. | ||
file_put_contents( './functions.php', $elite_plugin_file ); |
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,26 @@ | ||
#!/bin/bash | ||
|
||
set -eo | ||
|
||
TMP_DIR="$GITHUB_WORKSPACE/zip" | ||
mkdir "$TMP_DIR" | ||
|
||
# If there's no .gitattributes file, write a default one into place | ||
if [ ! -e "$GITHUB_WORKSPACE/.distignore" ]; then | ||
echo "ℹ︎ Creating .distignore file" | ||
|
||
cat > ".distignore" <<-EOL | ||
/.gitattributes | ||
/.gitignore | ||
/.github | ||
/README.md | ||
/.editorconfig | ||
/composer.json | ||
/index.php | ||
EOL | ||
fi; | ||
|
||
echo "➤ Copying files to $TMP_DIR" | ||
|
||
# This will exclude everything in the .gitattributes file with the export-ignore flag | ||
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" "$TMP_DIR/" --delete |
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,63 @@ | ||
.babelrc | ||
.browserslistrc | ||
.deployment | ||
.distignore | ||
.DS_Store | ||
.editorconfig | ||
.eslintignore | ||
.git | ||
.gitattributes | ||
.github | ||
.gitignore | ||
.idea | ||
.Trashes | ||
.php-cs-fixer.dist.php | ||
composer.lock | ||
gulp-tasks | ||
phpunit.xml | ||
.phplint.yml | ||
.vipgoci_phpcs_skip_folders | ||
.husky | ||
.npmrc | ||
.release-please-manifest.json | ||
.vipgoci_lint_skip_folders | ||
.vipgoci_phpcs_skip_folders | ||
phpcs.xml | ||
phpdoc.dist.xml | ||
SECURITY.md | ||
yarn.lock | ||
yarn-error.log | ||
webpack.config.babel.js | ||
/wp-components | ||
/output | ||
/sourcedata | ||
/wiki | ||
/composer.json | ||
/index.php | ||
/README.md | ||
bower_components | ||
/node_modules | ||
atlassian-ide-plugin.xml | ||
Desktop.ini | ||
Gruntfile.js | ||
gulpfile.js | ||
gulpfile.babel.js | ||
scss | ||
Thumbs.db | ||
phpDocumentor.phar | ||
auth.json | ||
/zip | ||
blocks/src | ||
blocks/node_modules | ||
commitlint.config.js | ||
docker_tag | ||
Dockerfile-php-build | ||
output.log | ||
release-please-config.json | ||
renovate.json | ||
DOCKER_ENV | ||
/frontend | ||
/dist | ||
package-lock.json | ||
/src | ||
webpack.config.js |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
* @wpengine/developer-relations | ||
* @linchpin/developer-relations |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
on: | ||
pull_request: | ||
branches: [trunk] | ||
push: | ||
branches: [trunk] | ||
|
||
name: WordPress Autofixer | ||
|
||
jobs: | ||
phpcbf-fixer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: "ramsey/composer-install@v1" | ||
|
||
# Check the code-style consistency of the PHP files. | ||
- name: Fix PHP code style | ||
id: codestyle | ||
continue-on-error: true | ||
run: ./vendor/squizlabs/php_codesniffer/bin/phpcbf . --standard=./phpcs.xml | ||
|
||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
commit-message: PHPCBF Auto Fix | ||
committer: Linchpin Bot <[email protected]> | ||
signoff: false | ||
branch: ${{ github.event.pull_request.head.ref }}-phpcbf | ||
delete-branch: true | ||
title: 'Auto Fix Formatting' | ||
body: | | ||
Update Code Formatting | ||
labels: | | ||
phpcs | ||
automated pr |
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,28 @@ | ||
on: | ||
pull_request: | ||
branches-ignore: | ||
# Do not run on auto submitted branches | ||
- '**-phpcbf' | ||
- 'renovate/' | ||
- 'dependabot/' | ||
paths: | ||
- '**.php' | ||
|
||
name: WordPress Coding Standards Inspections | ||
|
||
jobs: | ||
runPHPCSInspection: | ||
name: Run PHPCS inspection | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Run PHPCS inspection | ||
uses: rtCamp/[email protected] | ||
env: | ||
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | ||
SKIP_FOLDERS: ".deployment,.github,assets,.husky,css,js,lib,vendor" | ||
PHPCS_STANDARD_FILE_NAME: "./phpcs.xml" | ||
with: | ||
args: "WordPress,WordPress-Core,WordPress-Extra" |
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,36 @@ | ||
on: | ||
pull_request: | ||
branches-ignore: | ||
# Do not run on auto submitted branches | ||
- '**-phpcbf' | ||
- 'renovate/' | ||
- 'dependabot/' | ||
paths: | ||
- '**.php' | ||
|
||
name: PHP Lint | ||
|
||
jobs: | ||
php-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: "ramsey/composer-install@v2" | ||
|
||
- name: PHP Lint | ||
uses: overtrue/[email protected] | ||
with: | ||
path: . |
Oops, something went wrong.