Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding support for lifecycle hooks #186

Merged
merged 12 commits into from
Jun 5, 2017
Merged

feat: adding support for lifecycle hooks #186

merged 12 commits into from
Jun 5, 2017

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jun 4, 2017

I'm putting the finishing touches on #167

`standard-version` supports lifecycle scripts. These allow you to execute your
own supplementary commands during the release. The following
hooks are available:

* `prebump`: executed before the version bump is calculated. If the `prebump`
  script returns a version #, it will be used rather than
  the version calculated by `standard-version`.
* `postbump`: executed after the version has been bumped and written to
  package.json. The flag `--new-version` is populated with the version that is
  being released.
* `precommit`: called after CHANGELOG.md and package.json have been updated,
  but before changes have been committed to git.

Simply add the following to your package.json, to enable lifecycle scripts:

```json
{
  "standard-version": {
    "scripts": {
      "prebump": "echo 9.9.9"
    }
  }
}

thanks for getting us most of the way there @lancecaraccioli.

@coveralls
Copy link

coveralls commented Jun 4, 2017

Coverage Status

Coverage decreased (-0.6%) to 99.401% when pulling 31ce3eb on issue-157 into 13eb9cd on master.

@coveralls
Copy link

coveralls commented Jun 4, 2017

Coverage Status

Coverage decreased (-0.9%) to 99.095% when pulling d8e8346 on issue-157 into 13eb9cd on master.

@coveralls
Copy link

coveralls commented Jun 4, 2017

Coverage Status

Coverage decreased (-1.2%) to 98.83% when pulling d8e8346 on issue-157 into 13eb9cd on master.

@coveralls
Copy link

coveralls commented Jun 4, 2017

Coverage Status

Coverage decreased (-1.2%) to 98.83% when pulling d32a739 on issue-157 into 13eb9cd on master.

@coveralls
Copy link

coveralls commented Jun 4, 2017

Coverage Status

Coverage decreased (-0.4%) to 99.583% when pulling e37092a on issue-157 into 13eb9cd on master.

@coveralls
Copy link

coveralls commented Jun 5, 2017

Coverage Status

Coverage decreased (-0.4%) to 99.613% when pulling 41fbf71 on issue-157 into 86af7fc on master.

@bcoe bcoe merged commit dfd1d12 into master Jun 5, 2017
@bcoe bcoe deleted the issue-157 branch June 5, 2017 00:04
@lancecaraccioli
Copy link

Thanks for the polish @bcoe much appreciated. My work life interfered with my availability unfortunately glad to see you guys took it and ran with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants