Cache successful commits
```git-check-assertions run test/git-check-assertions.bats assert_success git checkout HEAD~1 bin run test/git-check-assertions.bats assert_failure assert_output --partial "file exists, but it was expected to be absent" ```
This commit is contained in:
parent
fea90637e3
commit
e647b2599b
4 changed files with 80 additions and 1 deletions
|
|
@ -73,6 +73,12 @@ You can technically assert that a command fails by writing `! ... || exit 1`, or
|
|||
|
||||
I'm considering taking `bats-assert` as a dependency, but for now, this very minimal set of functions with a similar interface should get you on your way.
|
||||
|
||||
## Cache of successful commits
|
||||
|
||||
After a commit's assertions run successfully, `git-check-assertions` appends the commit hash to `.git-check-assertions-cache` in the repo root. On the next run, any commit listed there is skipped.
|
||||
|
||||
Be sure to add `.git-check-assertions-cache` to your `.gitignore`.
|
||||
|
||||
## Examples of commit messages
|
||||
|
||||
Assert that a commit builds:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue