Code contributions, bug reports, and feedback are very welcome. These should be submitted through the GitHub repository. Development happens in the develop
branch, and any pull requests should be made against that branch please.
You can clone this repo and activate it like a normal WordPress plugin, but you'll need to install the developer dependencies in order to build the assets and to run the tests.
-
Install the PHP dependencies:
composer install
-
Install the Node dependencies:
npm install
-
If you want to run the tests locally, check the MySQL database credentials in the
tests/.env
file and amend them as necessary.
To compile the JS and CSS:
npm run build
To start the file watcher which will watch for changes and automatically build the JS and CSS:
npm run start
To run the whole test suite which includes unit tests and linting:
composer test
To run just the PHPUnit tests:
composer test:ut
To run just the code sniffer:
composer test:phpcs
To run just the PHP Static Analysis tool:
composer test:phpstan
To lint the JS and CSS:
npm run lint
These are the steps to take to release a new version of Authorship (for contributors who have push access to the GitHub repo).
- Check the milestone on GitHub for open issues or PRs. Fix or reassign as necessary.
- If this is a non-patch release, check issues and PRs assigned to the patch or minor milestones that will get skipped. Reassign as necessary.
- Ensure you're on the
develop
branch and all the changes for this release have been merged in. - Ensure
README.md
contains an up to date description, "Tested up to" version, FAQs, screenshots, etc. - Run
composer test
and ensure everything passes. - Prepare a changelog for the Releases page on GitHub.
- The
git changelog -x
command from Git Extras is handy for this.
- The
- Bump and commit the plugin version number using
npm run bump:{INCEMENTOR}
, eg:npm run bump:patch
,npm run bump:minor
, ornpm run bump:major
- Push to a new release branch, eg:
git checkout -b release-vxxx
and thengit push
- Create a new pull-request from that branch, eg:
hub pull-request
- Wait until (and ensure that) the build passes
- Get the PR reviewed and merged
git checkout main
git merge develop
git push origin main
git push origin main:release
- Wait for the Build Release action to complete
- Enter the changelog into the release on GitHub and publish it.