Release manager for npm, bower, component, PyPI, git tags, and any plugin you can write


Release manager for npm, bower, component, PyPI, git tags, and any plugin you can write.

This was created out of frustration; there was no generic sharable release manager. Previously, I was using git-extra's git-release command with dotfiles git hooks.

Install the module via: npm install foundry

By default, foundry is not configured with any release libraries. Install a release library via npm:

npm install foundry-release-bower  # bower
npm install foundry-release-component  #
npm install foundry-release-git  # git
npm install foundry-release-npm  # npm
npm install foundry-release-pypi  # PyPI

Details about existing plugins and their documentation can be found under the Plugins heading.

For example purposes, we will create/release on a local-only git repository.

# Install a `git` foundry-release plugin
npm install foundry-release-git
# Create git repo
mkdir foundry-example
cd foundry-example
git init
echo "Hello World" >
git add
git commit -m "Added documentation"
# Run our release
#   `./node_modules/.bin` can be avoided by using `npm-run-script`
./node_modules/.bin/foundry release 0.1.0
# [master c6ce921] Release 0.1.0
# See the release commit and tag
git log --decorate --oneline
# c6ce921 (HEAD, tag: 0.1.0, master) Release 0.1.0
# f0c25b3 Added documentation

foundry supports global installation since it loads plugins from its peer node modules. This previous example can be done globally via:

# Install `foundry` and a `git` foundry-release plugin
npm install -g foundry
npm install -g foundry-release-git
# Run our release
foundry release 0.1.0

foundry provides a command line interface for releasing.

$ foundry --help
  Usage: foundry [options] [command]
    release <version>      Set version for package metadata and publish to registries
    plugins                List installed `foundry` plugins
    completion             Get potential completions for a command. Looks for `COMP_CWORD`, `COMP_LINE`, `COMP_POINT`.
    -h, --help     output usage information
    --plugin-dir <directory>  Directory to load plugins from. Should have same structure as `node_modules`
    -V, --version  output the version number

Example releases are:

foundry release 0.1.0
foundry release 0.3.0
foundry release 1.0.0

Commands that automatically increment semver are planned (e.g. foundry release major, foundry release minor). See for more information.

When a release occurs, the following steps are processed:

  1. Update files, update package files with the new version and changes (e.g. update package.json, add to
  2. Commit, persist any changes to a version control system (e.g. git commit && git tag)
  3. Register, if the package is new (semver === 0.1.0), then register it to its repository (e.g. python register)
  4. Publish, release changes to package's repostiroy manager (e.g. npm publish)

foundry plugins contain the foundry-plugin keyword and adhered to the foundry release plugin specification:

Existing plugins are:

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via grunt and test via npm test.

Support this project and others by twolfson via gittip.

As of Dec 07 2013, Todd Wolfson has released this repository and its contents to the public domain.

It has been released under the UNLICENSE.