Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 3.16 KB

CONTRIBUTING.md

File metadata and controls

71 lines (47 loc) · 3.16 KB

Contributing to Genesis Custom Blocks

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

Local Setup

Genesis Custom Blocks generally follows WordPress coding standards for PHP and JavaScript.

There's a pre-commit hook and linting scripts like npm run lint.

Install Dependencies

composer install && npm install

Watch Changes

npm run dev

PHPUnit

WP_TESTS_DIR=/path/to/wordpress-develop/tests/phpunit composer test

If you've already installed the DB for the WordPress Core unit tests, simply pass the path to wordpress-develop/tests/phpunit/ as WP_TESTS_DIR, as shown above.

Otherwise, clone wordpress-develop. Then, cd back to this plugin and do:

WP_TESTS_DIR=/path/to/wordpress-develop/tests/phpunit ./bin/install-wp-tests.sh <db name> <db user> <db password>

Use whatever DB name you'd like, and substitute a DB user and password that works in your environment.

Branching

Generally, you'll want to branch off the default branch, develop.

If you're developing for a release branch, like 1.1, branch off that.

Release branches themselves should be branched off develop.

Plugin Versions

The plugin versions should follow Semantic Versioning.

Release Procedure

  1. checkout locally whatever branch you want to release. It could be develop, or a release branch like 1.0.
  2. Do npm run gulp, and you'll see package/genesis-custom-blocks.x.x.x.zip.
  3. Smoke test that .zip file.
  4. Create a release, targeting whatever branch you chose in step 1.
  5. Upload the .zip file you created to the release page.
  6. The 'Tag version' should be the plugin version, like 1.0.0.
  7. Publish the release
  8. CircleCI will then deploy the plugin to the wp.org SVN
  9. Smoke test the plugin deployed to wp.org
  10. If this release was for a release branch, like 1.0, open a PR from that branch to develop.
  11. Do ./bin/tag-built.sh
  12. This will create a built tag like 1.0.0-built and push it. Then, other plugins like the Pro plugin can require this plugin as a Composer dependency.
  13. In the Pro plugin's composer.json, update the commit hash of this free plugin to the new built tag.
  14. Also create a release of the Pro plugin, as it should have the latest version of this free plugin.
  15. To resume normal local development, do composer install, as running gulp will remove the Composer dev dependencies.

Thanks! ❤️ ❤️ ❤️

Genesis Custom Blocks Team