tidepool-org / tools

A place to put tooling and scripts that help when working on Tidepool stuff.
Other
11 stars 11 forks source link

discuss preparing an npm module for release from git #3

Closed bewest closed 10 years ago

bewest commented 10 years ago

The tool uses git-extras to automatically prepare a repo for "release"-like status. It increments the version number in package.json using the same semantics as npm version, in addition to preparing some release notes specific to this release.

It was designed with the following priorities:

I often use this to preview the commits and the results of the process, and I like having most of the manual labor automated. The git-release tool in git-extras automatically performs network operations, which I disagree with. I want the opportunity to preview what has happened before sending it over the network.

Using this tool has allowed me to expose and fix errors performed by myself and others.

The tool also makes it easy to communicate what is in an individual release, in terms of one-line commit summaries very easy. If the commit one-lines are written well, this can be a good way to prepare more of a narrative of the release, with hints on what to test. Once everyone is happy with the release, it's easy to merge, and perform the network activity to officially publish it with confidence.

Consequently the automation here is intended to address those two aspects of preparing releases:

How to deal with release notes, formatting, etc, isn't really the primary objective here, just being able to reliably produce an upgraded npm module.

A few caveats, the name

bewest commented 10 years ago

usage notes

$ ./prep_repo_release.sh [major|minor|patch]
Prepare and review an impending npm release for your git repo.
  * version specific release notes via git-changelog -t
  * bump package version via npm version
  * Create semver tag pointed at result.
  * leave all commits on branch named `release/$TAG` for PR/review