Skip to content
Steven Soloff edited this page Apr 19, 2017 · 5 revisions

The following steps should be executed when ready to release a new version to production.

Perform user acceptance testing in staging environment

Complete user acceptance testing in the staging environment before releasing to production.

Update change log

Ensure you are on the develop branch:

$ git checkout develop

Update the change log, if necessary. If updates are made, the commit message

Prepare for #.#.# release

is recommended, where #.#.# is the version to be released (i.e. the package version after bumping; see next step).

Bump version

Bump the package version by running the command:

$ npm version <type> --no-git-tag-version

where <type> is the version segment to bump (e.g. major, minor, etc.). (Note that we are using --no-git-tag-version because we want to ensure that the final merge commit on the master branch [see below] is the commit that is tagged with the new version. Unfortunately, --no-git-tag-version suppresses both the tag and the commit. Thus, we must manually commit the version bump [see below].)

Commit the version bump:

$ git commit -am "Bump version to <#.#.#>"

where <#.#.#> is the new version.

Push the version bump commit:

$ git push

Release to production

Ensure you are on the master branch:

$ git checkout master

Merge the develop branch to master:

$ git merge --no-ff develop

Tag the release:

$ git tag v<#.#.#>

where <#.#.#> is the new version.

Push the merge commit and tag:

$ git push && git push --tags