👍🎉 First off, thanks for taking the time to contribute! 🎉👍
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.
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
.
The plugin versions should follow Semantic Versioning.
checkout
locally whatever branch you want to release. It could bedevelop
, or a release branch like1.0
.- Do
npm run gulp
, and you'll seepackage/genesis-custom-blocks.x.x.x.zip
. - Smoke test that
.zip
file. - Create a release, targeting whatever branch you chose in step 1.
- Upload the
.zip
file you created to the release page. - The 'Tag version' should be the plugin version, like
1.0.0
. - Publish the release
- CircleCI will then deploy the plugin to the wp.org SVN
- Smoke test the plugin deployed to wp.org
- If this release was for a release branch, like
1.0
, open a PR from that branch todevelop
. - Do
./bin/tag-built.sh
- 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. - In the Pro plugin's
composer.json
, update the commit hash of this free plugin to the new built tag. - Also create a release of the Pro plugin, as it should have the latest version of this free plugin.
- To resume normal local development, do
composer install
, as runninggulp
will remove the Composer dev dependencies.
Thanks! ❤️ ❤️ ❤️
Genesis Custom Blocks Team