Creating a Release
These steps assume you’re utilizing Tower.
- Make sure Git Flow is set up in Tower if that’s the app you use.
- Stop all
gruntprocesses you might have running to avoid compiling any further by pressing OPT+C in your code editor or OS’ Terminal. - Make sure your local
developandmain(or, if an outdated project:master) branch is up to date. - Select “Start release” from the Git Flow button in Tower, and name it with your new release number[
1.0.1., for example]. This creates a new “Release” tag branch.- You should not have any changes you need to stash. If you do, commit them to develop first.
- Version bump your theme [see Versioning below if you don’t know how] and update
CHANGELOG.mdwith a brief list of changes. Copy that[you’ll need it in a second]. - Commit to the release branch with the following message: “Version bump to [your new version number here;
#.#.#.]” - Select “Finish Release” from the Git Flow button in Tower.
- Paste in your changes from
CHANGELOG.mdinto the Tag Message area in the Finish Release screen. - Both master/main and develop will update. Push changes from both branches to Github.
- Finally, in Github, create a new release using the same version number as the tag, and past in the changes from
CHANGELOG.md.
Theme Versioning
How to version bump your theme
You can force your CSS and Javascript to refresh in your theme by updating your theme version. When you update your theme version, the framework uses a process called cache busting to make sure browsers know there is a new version of the CSS and Javascript available.
Update the version number
You’ll need to update the theme version in one place: package.json.
- In your projects
package.jsonfile: increment the version number appropriately. - For this example, we’ll assume we’re making a minor update from the first big release of the theme. That means we’ll be going from
1.0.0to1.0.1. - Save
package.jsonwith the adjustment. In this case:"version": "1.0.1", - Regenerate Assets: In your code editor or OS terminal, type in the
grunt versioncommand and hit RETURN. Doing this will apply the new version number inpackage.jsonto your projects SCSS, Javascript, andfunctions.phpfile. - Type in one final
grunt buildto compile everything and update the projects CSS files. - Now that the new version number has been applied, update
changelog.mdwith the version number[Example:## 1.0.1] and a few bullets in high-level detail (referencing issue numbers) what was coded or adjusted..
And just like that: you’ve updated a projects version number!