Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 4.77 KB

CONTRIBUTING.md

File metadata and controls

57 lines (40 loc) · 4.77 KB

Contributing

This plugin is under active development on GitHub:

https://github.com/pantheon-systems/pantheon-hud

Please feel free to file issues there. Pull requests are also welcome!

Workflow

The main branch is the development branch which means it contains the next version to be released. release contains the corresponding stable development version. Always work on the main branch and open up PRs against main.

We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into main when merging, and to include the PR # in the commit message. PRs to main should also include any relevent 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 main.

main should be stable and usable, though possibly a few commits ahead of the public release on wp.org.

The release branch matches the latest stable release deployed to wp.org.

Testing

You may notice there are three sets of tests running:

These test suites can be run locally, with a varying amount of setup.

PHPUnit requires the WordPress PHPUnit test suite, and access to a database with name wordpress_test. If you haven't already configured the test suite locally, you can run bash bin/install-wp-tests.sh wordpress_test root '' localhost.

Behat requires a Pantheon site. Once you've created the site, you'll need install Terminus, and set the TERMINUS_TOKEN, TERMINUS_SITE, and TERMINUS_ENV environment variables. Then, you can run ./bin/behat-prepare.sh to prepare the site for the test suite.

Note that dependencies are installed via Composer and the vendor directory is not committed to the repository. You will need to run composer install locally for the plugin to function. You can read more about Composer here

Release Process

  1. From main, checkout a new branch release_X.Y.Z.
  2. Make a release commit:
    • Drop the -dev from the version number in package.json, README.md, readme.txt, and pantheon-hud.php.
    • Update the "X.Y.Z-dev" 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.
  3. Open a Pull Request to merge release_X.Y.Z into release. Your PR should consist of all commits to main since the last release, and one commit to update the version number. The PR name should also be Release X.Y.Z.
  4. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into release. Use a "merge" commit, do no not rebase or squash.
  5. Pull release locally, create a new tag, and push up.
  6. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
  7. 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.
  8. Wait for the Release pantheon-hud 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.
  9. Check WordPress.org: Ensure that the changes are live on the plugin repository. This may take a few minutes.
  10. Following the release, prepare the next dev version with the following steps:
    • git checkout develop
    • git rebase release
    • Update the version number in all locations, incrementing the version by one patch version, and add the -dev flag (e.g. after releasing 1.2.3, the new verison will be 1.2.4-dev)
    • Add a new ** X.Y.Z-dev ** heading to the changelog where X.Y.Z-dev is the new patch version.
    • git add -A .
    • git commit -m "Prepare X.Y.X-dev"
    • git push origin develop