Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.52 KB

RELEASE.md

File metadata and controls

46 lines (35 loc) · 2.52 KB

How to release

This project is hosted on NPM. You can find the terra packages here.

Below is a guide for releasing packages:

  • Checkout the master branch and run git pull to ensure you have the latest changes in master.

  • Run npm run clean:install to ensure you have npm packages updated for the master branch.

  • Run lerna updated to view all packages that have updates to be released.

  • Be sure to check the changelogs of all packages that have updates and ensure the changelogs are updated accordingly.

  • Verify that the version number in the package.json is correct.

    • If the package is new, confirm that the version is 0.0.0.
    • If the package has been published before, confirm that the version matches the latest released version. The publish script will update the version.
  • Login to npm. Use your personal npm account.

    • npm login - CLI command to log into npm.
    • npm whoami - CLI command to confirm who you are logged in as.
  • Run the npm run publish script from the root directory.

When run, this command does the following:

  • Creates a new release of the packages that have been updated.
  • Prompts for a new version.
  • Creates a new git commit/tag in the process of publishing to npm.

More specifically, this command will:

  • Check if the currently installed packages match the versions in the package.json
  • Run each package's compile command to generate the distributed code
  • Run tests for each package
  • Run the equivalent of lerna updated to determine which packages need to be published
  • Prompt for a new version for each updated package
  • Update the package.json of all updated packages to their new versions
  • Update all dependencies of the updated packages with the new versions, specified with a caret (^)
  • Create a new git commit and tag for the new version
  • Publish updated packages to npm

If you are publishing a new package, e.g. a v1.0.0 release, the package will be listed with only you as the collaborator. You'll need to move the package into the terra-ui team under the Cerner org on npm.

  • Log into npm's website
  • Navigate to the terra-ui package page: https://www.npmjs.com/settings/cerner/teams/team/terra-ui/access
  • At the top of this page, there should be an input labeled, "Package". Type in the full package name and press enter.
  • This will add the package to ther terra-ui team's packages under the Cerner org on npm and then all team members on the terra-ui team in npm will have access to publish in future releases.