Skip to content

Deploying new versions

Adriano Castro edited this page Apr 15, 2021 · 8 revisions

The following outlines the process for deploying new versions of this framework. After merging the relevant PRs:

  1. Bump all versioned namespaces to the new plugin version number, i.e. v5_5_4
    • Be sure to also bump those found in /tests
    • Do a search and ensure no instances of the previous namespace are present
    • Do a search for x.y.z and replace them for the new version number
  2. Bump the SV_WC_Plugin::VERSION constant to the new version
  3. Bump the composer.json version number. There is no need to run composer update to update the composer.lock file because the package version is not include in that file.
  4. Bump the package.json version number using npm version --no-git-tag-version --allow-same-version {version}. This will update the version number in the package.json and package-lock.json files without updating any of the dependencies.
  5. Bump the SV_WC_Framework_Plugin_Loader::FRAMEWORK_VERSION constant. This is only used by implementing plugins, but it's good to keep it up to date
  6. Update /woocommerce/changelog.txt with the final date and version
  7. Run npm run build to compile assets and generate an updated POT file
  8. Run the test suites and confirm they are passing
    • codecept run unit
    • codecept run integration
    • codecept run acceptance
  9. Commit with a message of Version {version number}
    • Wait until all the checks have passed like the ones executed by Travis CI
  10. Confirm that the automated tests pass ✅
  11. Copy the bullet points of the version's changelog entry
  12. Create a new release
    • Name the tag the plain version number (no v or other prefix)
    • Name the release with the v prefix
    • Paste in the changelog entries as the description
  13. Update the Upgrade-guide

Common issues

Issues while running npx run build

  1. Could not find an option named "sourcemap"
    • Install Ruby
    • Run gem install sass
  2. parcel: not found
  3. .../wc-plugin-framework/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js: Invalid Version: undefined
    • Open the .js file
    • Add the following snippet to the top of the file
      /**
       * Version 5.10.5
       */
    • Run the npx run build again
    • Rollback the changes to the .js file