-
Notifications
You must be signed in to change notification settings - Fork 190
Build & Release
- Ensure you have
svninstalled on your system by runningwhich svn. For macOS,svncan be installed (if missing) usingbrew install svn. - Ensure you have Woorelease>
2.3.0installed and configured.
In this guide, we will assume that the Woorelease script is aliased to wr.
SVN requires the following to be present in the ~/.subversion/servers file:
[groups]
wporgplugins = plugins.svn.wordpress.org
[wporgplugins]
username = automattic
store-passwords = noAlso be aware that, in this guide, X.X.X is used as a placeholder but should be replaced with the actual release version (e.g., 1.5.0).
-
Create a
release/X.X.Xbranch based offdevelop. Copy the URL for the branch from GitHub for use later (e.g.https://github.com/woocommerce/facebook-for-woocommerce/tree/release/1.5.0) -
Ensure the
readme.txtandchangelog.txtfiles have changelog entries for the changes included in the new version (note the header formatting difference inreadme.txt)- In the
readme.txtfile the heading format is= X.X.X - 2021-xx-xx = - In the
changelog.txtfile the heading format is2021-xx-xx - version X.X.Xshould be left untouched, and will be automatically replaced during the release process. - Note that
2021-xx-xxshould be left with thexx-xxvalues unfilled, as they will be automatically replaced by Woorelease. - You can use
wooreleaseto generate changelog entries:If you bump WP/WC tested versions, you can addwoorelease cl:generate --product_version=X.X.X https://github.com/woocommerce/facebook-for-woocommerce/tree/release/X.X.X--wp_tested=5.9 --wc_tested=6.0. Copy the produced entries to thechangelog.txtwith the correct header.
- In the
-
Using the URL from step 1, run
wr simulate --product_version=X.X.X https://github.com/woocommerce/facebook-for-woocommerce/tree/release/X.X.X
- Confirm that there are no errors generated from the
simulatecommand.
Since the entry headings of changelog.txt are not in the usual WPORG format, using woorelease version ≤ 2.0.4 will cause an issue when deploying to WPORG. The issue has been fixed in woocommerce/woorelease#328, until it's released, please consider using woorelease 6a492b9abd379e8dc8f0e19807a39b4f6daa8720 or develop versions to avoid the issue. For example:
php woorelease.php release --product_version=X.X.X https://github.com/woocommerce/facebook-for-woocommerce/tree/release/X.X.XAnd about how to detect and fix this deployment issue after running woorelease, please refer to the After deploy section for troubleshooting instructions.
Deployment involves substituting the simulate command with the release command:
wr release --product_version=X.X.X https://github.com/woocommerce/facebook-for-woocommerce/tree/release/X.X.XIf you encounter an error with the SVN portion of the process, it's possible that you need to clear out the SVN cache:
rm -rf ~/.subversion/auth/If an error occurs during the release command above due to SVN, you can re-run just the release portion:
wr wporg:release --product_version=X.X.X --release https://github.com/woocommerce/facebook-for-woocommerce/tree/release/X.X.X- Confirm the release deployed correctly to GitHub and WPORG.
- Ensure you can download and install the latest release from WPORG and WCCOM.
- We’ve had an issue where the release tag (e.g. 2.6.1) wasn’t present in the svn
tags/folder. - Troubleshooting processes when the release version doesn't exist in the svn
tags/folder:- Check the version by
Stable tagin https://plugins.svn.wordpress.org/facebook-for-woocommerce/trunk/readme.txt to see if the new release is committed totrunk - If the above version is the same as the one just released, then you can make up the missed version tag by
svn cp https://plugins.svn.wordpress.org/facebook-for-woocommerce/trunk https://plugins.svn.wordpress.org/facebook-for-woocommerce/tags/X.X.X -m "Tagging version X.X.X". Please note that theX.X.Xis used as a placeholder but should be replaced with the actual release version (e.g.,1.5.0). - Wait for a while, and the zip file should be able to download from: https://downloads.wordpress.org/plugin/facebook-for-woocommerce.x.x.x.zip
- Check the version by
- Create the PRs to merge the release branch into
trunkanddevelop. - Close the release milestone.
- Publish any documentation updates relating to the release: