-
Notifications
You must be signed in to change notification settings - Fork 190
Build & Release
This document is out of date - please refer to P2 docs
- Ensure the
readme.txtandchangelog.txtfiles have changelog entries for the changes included in the new version (note the header formatting difference inreadme.txt) - Ensure the changelog date and version uses the following format:
{year}.nn.nn {version}-dev.{number}. Sake expects to see and will replace2021.nn.nnwith the current version and{version}-dev.{number}(e.g 2.4.0-dev.1) with the version selected during deploy. - Ensure that the value for the
Stable tagheader inreadme.txtis{version}-dev.{number} - Ensure that the value for the
WC_Facebookcommerce::VERSIONconstant is{version}-dev.{number} - Ensure that the value for the
Versionheader infacebook-for-woocommerce.phpis{version}-dev.{number} - Ensure you have no untracked files or uncommitted changes on your working directory
Facebook for WooCommerce uses Sake to build assets and deploy new versions. You can check the Getting started page for installation instructions.
Once Sake is installed, you'll have to set a value for the following environment variables. Make sure to copy .dist.env to .env and provide a value.
-
GITHUB_USERNAME: your GitHub username -
GITHUB_API_KEY: used to access the GitHub API to retrieve information about the repository and to create releases automatically. These can be generated on the Applications settings page. -
WP_SVN_USER: the username of a WordPress.org user with permissions to commit changes to https://plugins.svn.wordpress.org/facebook-for-woocommerce/. Sake will ask for the password the first time that the user attempts to commit. -
SAKE_PRE_RELEASE_PATH: a path to a directory where the zip files generated withsake prereleaseshould be stored (e.g.~/Projects/prereleases)
You can also define these variables as shell environment variables in your .bash_profile (or .zprofile if you use zsh).
Run composer install --no-dev as a sanity check to confirm that your vendor directory is clean. It doesn't hurt if you want remove the vendor directory entirely and let Sake create it again during the deploy process.
Then, deploy the new version with:
npx sake deploy --deployAssets=0
Check the Configuration and CLI Options pages to learn more about how to control Sake.
- Set the
WP_SVN_USERenvironment variable to the username that should be used to push changes to WordPress.org. Saké will ask for the password the first time that user attempts to commit. - Use
npx sake deploy --deployAssets=0to skip theshell:svn_commit_assetsaction not used on this repo
If you deploy from a branch, before merging the changes into master, follow these steps to fix the tag that Sake creates:
-
git fetchto get the latest tags -
git tag -d {version}to delete the tag thatsakecreated git tag {version} {hash of Facebook for WooCommerce versioning commit}-
git push --tags -fto overwrite the tag on GitHub with the modified tag