Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.91 KB

RELEASE.adoc

File metadata and controls

60 lines (41 loc) · 2.91 KB

Release Process

This is document is targeted to Tangential developers. It describes how to perform a release, and how to publish the libraries to NPM.

If you have cloned Tangential in order to bootstrap your own 'Component Library' project, this will likely be of interest to you as well.

Publishing

These steps have only been tested on MacOS. It will probably work on any 'nix variant. MS Windows with a developer 'nix shell is a distinct 'maybe'.

If you are cloning this project for your own devious purposes, see the Using this project as a bootstrap section, near the end.

Do once (AKA 'setup steps')

1) Create a github access token https://github.com/settings/tokens and save it in a file named generate-changelog-token.local.txt 1) Clean and build the project successfully

Do every release

Only perform a release from Master branch

Assumptions

  1. You have no uncommitted code.

  2. All changes intended for the release have already been merged to master.

Release Process for a library

  1. Pull from origin/master

  2. Run gulp versionBump --lib [libName] -i preminor [--preid [alpha|beta|rc]] && git add .

    1. For example gulp versionBump --lib core -i preminor --preid beta && git add .

    2. -i can take any of the semver values that npm version accepts ({major | minor | patch | premajor | preminor | prepatch | prerelease})

  3. Verify the version number has been updated and that there are no other uncommitted changes.

  4. Run ./generate-changelog.sh patch

    1. This should only modify and git add the changelog file.

    2. Execute the additional steps that are printed out to the console.

  5. Verify change log generated and that there are no uncommitted changes.

  6. Run NPM publish steps, below.

The following require your npm user account credentials. Adding a local .npmrc file with username=foo and email=foo@example.com can make this a bit nicer.

 # sign out of your normal account
> npm logout
 # Sign in to npm account
> npm login
> Username: (tangential)
> Password:
> Email: (this IS public) (you@example.com)
> Logged in as tangential on https://registry.npmjs.org/.
> npm run publish

Using this project as a bootstrap

As mentioned (somewhere), this project’s build structure was cloned from the Angular Material2. The clone was made prior to the Material team updating their build to deliver a single, monolithic NPM project, in line with the Angular2 project structure.

If you wish to release multiple components, but develop in a single project, this project would certainly be a good place to start. You will want to take a look at the procedures for 'scoped projects' in NPM, and create a user account that has the name you want to use for the parent project. For example, our project paths here are like '@tangential/scopedProjectNames', where 'tangential' is the npm 'user' name.