Skip to content

Commit c1a24f5

Browse files
author
Mike Foley
committed
Document running standalone
Fixes #32
1 parent 358bdb1 commit c1a24f5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: README.md

+11
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ Fit Commit aims to enforce *community standards*. The two influential guides are
164164

165165
The Git community has largely (but not completely) coalesced around these standards. [Chris Beams](http://chris.beams.io/posts/git-commit/) and the [Pro Git book](https://git-scm.com/book) also provide good summaries on why we have them.
166166

167+
### How can I run this standalone, like part of a CI process?
168+
169+
Fit Commit can be run outside of a Git hook context with a simple shell script:
170+
171+
```sh
172+
$ GIT_BRANCH_NAME=branch_name COMMIT_MESSAGE_PATH=path/to/message rbenv exec ruby -rrubygems -e 'require "fit_commit"; FitCommit.run'
173+
```
174+
175+
It exits with an error code if any errors are present, which will fail a build if it's part of a CI run. The configuration should be modified for CI to be more lenient, otherwise false positives will break the build too often.
176+
177+
167178
### How can I improve Fit Commit?
168179
Fit Commit aims to be useful to everyone. If you can suggest an improvement to make it useful to more people, please open a GitHub Issue or Pull Request. See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.
169180

0 commit comments

Comments
 (0)