Creating Candela releases¶
To perform a new release of Candela, please follow these steps. This assumes
that the code on
master is ready to be turned into a new release (i.e., it
passes all tests and includes all new functionality desired for the new
release). In this example, we will pretend that the new release version number
will be 1.2.0.
Create a new release branch, named
git checkout -b release-1.2.0 master
Bump the version number to 1.2.0 by editing
package.json. Make a commit with the commit message “Bump version number for release” and push the branch:
vim package.json git commit -am 'Bump version number for release' git push -u origin release-1.2.0
Make a new local branch to save your spot in the commit tree here. Be sure your checkout remains on
release-1.2.0. You can do this with:
git branch save-point
Build the distribution files by using the “production” NPM script:
npm run build:production
This will create a
Commit the production files and push again.
git add dist git commit -m 'Add production files for release' git push
Create a pull request from the release-1.2.0 branch. Make sure you base the PR against the
releasebranch, not against
Wait for an “LGTM” message, and then merge the pull request and delete the release-1.2.0 branch.
Check out the
releasebranch, pull, tag a release, push, and then delete the
git checkout release git pull git tag v1.2.0 git push --tags git branch -d release-1.2.0
Publish the new package to NPM. You will need to log in with your NPM credentials first.
npm login npm publish
master(do not use a fast-forward merge, since this is a special type of commit to prepare master for development with a new version number, rather than adding any new functionality), push, then delete
save-point. Be sure you are not merging
releaseinto master; we do not want the distribution files to enter the mainline development branch.
git checkout master git merge save-point git branch -d save-point git push
This concludes the release process. You will have a new, tagged release
published, with a corresponding commit on the
release branch, while
master will have the package version number updated, ready for further