npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@msowa/gf-release

v1.4.6

Published

gitflow release node script

Downloads

3

Readme

gitflow command line release helper - less typing when doing a gitflow release

XO code style

Requirements

  • gitflow has to be initialized (please use gitflow-avh because nvie/gitflow hasn't been updated in years)
  • there needs to be at least one previous release with a valid semver version
  • npm > 3, node > 6

Usage

Install from npm

$ npm i -g gf-release

To start the release, call

$ gf-release [options] [command]

from the root of a gitflow enabled repo

What it does

  • check if the production and dev branches are up to date with the upstream branches
  • prompt for selecting the release type (major, minor, patch)
  • detect the last release version and the new release version based on the selection
  • start the gitflow release
    • bump the version number(s) of all files set in the config (see Config section below)
    • update the history file if it is specified in the config
    • execute the build script if it is specified in the config
    • commit the changes (use the -m cli flag for a custom commit message, otherwise it's Release ${releaseVersion})
  • finish the release
  • prompt if all branches and tags should be pushed
  • if everything was pushed, prompt if 'npm publish' should be executed (unless disabled via cli option)

Command line options

$ gf-release -h

Commands:

help  Display help

Options:

-d, --dry-run     only log commands without executing them (disabled by default)
-m, --message     enter a custom tag message, if not set it will be "Release [newVersion]"
-n, --no-publish  don't prompt for npm publish (disabled by default)
-s, --skip-build  skip build before finishing release
-t, --type        enter a bump version type - patch, minor or major

-h, --help        Output usage information
-v, --version     Output the version number

Config

This is the default configuration:

{
    versionFiles: ["package.json"],
    productionBranchName: "master",
    developBranchName: "develop",
    upstream: "origin",
    commitMessagesExclude: ['Merge tag'],
    commitMessagesInclude: [],
    buildCommand: null,
    historyFile: null,
    commitBaseUrl: null
}
  • versionFiles: json files that contain a version field which should be bumped when releasing
  • productionBranchName / developBranchName: self explanatory
  • upstream can be changed in case there's an alias set for origin
  • commitMessagesExclude: Array of strings, commit messages containing one of the strings won't be included in the History
  • commitMessagesInclude: Array of strings, only include commit messages in the History that contain one of the strings
    • if commitMessagesInclude contains one or more strings, the exclude array will be ignored
  • buildCommand: this command will be run before finishing the release, e.g npm run build
  • historyFile: if set it will prepend the history between the last release and this one to the file, e.g 'History.md'
  • commitBaseUrl: e.g. https://github.com/stbaer/gf-release/commit if set, links will be added to commits

It can be overwritten by adding a releaseConfig field to the package.json.

...
"releaseConfig": {
    "versionFiles": ["package.json", "config/version.json"],
    "buildCommand": "npm run myBuildScript",
    "productionBranchName": "prod",
    "developBranchName": "dev",
    "upstream": "myOriginAlias"
}

Contribute or Report Issue

Pull requests should target the develop branch.

For bugs and feature requests, please create an issue.

Licence

MIT, see LICENSE.md for details.