The best way to contribute to the development of this plugin is by participating on the GitHub project:
https://github.com/pantheon-systems/wp-decoupled-preview
Pull requests and issues are welcome!
Development and releases are structured around two branches, develop
and main
. The develop
branch is the default branch for the repository, and is the source and destination for feature branches.
We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into develop
when merging, and to include the PR # in the commit message. PRs to develop
should also include any relevant updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into develop
.
develop
should be stable and usable, though possibly a few commits ahead of the public release on wp.org.
The main
branch matches the latest stable release deployed to wp.org.
- From
develop
, checkout a new branchrelease_X.Y.Z
. - Make a release commit:
- Drop the
-dev
from the version number in readme.txt and wp-decoupled-preview.php - Update the "Latest" heading in the changelog to the new version number with the date
- Commit these changes with the message
Release X.Y.Z
- Push the release branch up.
- Drop the
- Open a Pull Request to merge
release_X.Y.Z
intomain
. Your PR should consist of all commits todevelop
since the last release, and one commit to update the version number. The PR name should also beRelease X.Y.Z
. - After all tests pass and you have received approval from a CODEOWNER, merge the PR into
main
. "Rebase and merge" is preferred in this case. Never squash tomain
. - Pull
main
locally, create a new tag (based on version number from previous steps), and push up. The tag should only be the version number. It should not be prefixedv
(i.e.X.Y.Z
, notvX.Y.X
). - Create a new release using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from the
Changelog
section of the readme into the body of the release, including the links to the closed issues if applicable. - Wait for the Release wp-decoupled-preview plugin to wp.org action to finish deploying to the WordPress.org plugin repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
- Check WordPress.org: Ensure that the changes are live on the plugin repository. This may take a few minutes.
- Following the release, prepare the next dev version with the following steps:
git checkout develop
git rebase main
- Update the version number in all locations, incrementing the version by one patch version, and add the
-dev
flag (e.g. after releasing1.2.3
, the new verison will be1.2.4-dev
) - Add a new
** Latest **
heading to the changelog git add -A .
git commit -m "Prepare X.Y.X-dev"
git push origin develop