Skip to content

Commit

Permalink
release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Abroskin committed Dec 21, 2019
1 parent af49db5 commit d864a80
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 17 deletions.
14 changes: 13 additions & 1 deletion .npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ pre-commit:
run: bundle exec rubocop --force-exclusion {all_files}
```
* ### **Execute in sub-directory**
If you want to execute the commands in a relative path
```yml
pre-commit:
commands:
backend-linter:
root: "api/" # Careful to have only trailing slash
glob: "*.rb" # glob filter
run: bundle exec rubocop {all_files}
```
* ### **Run scripts**
If oneline commands are not enough, you can execute files. [Example](./docs/full_guide.md#bash-script-example).
Expand Down Expand Up @@ -159,7 +171,7 @@ $ lefthook run fixer

---

## Table of content:
## Table of contents:

### Guides
* [Node.js](./docs/node.md)
Expand Down
Binary file modified .npm/bin/lefthook-linux
Binary file not shown.
Binary file modified .npm/bin/lefthook-mac
Binary file not shown.
Binary file modified .npm/bin/lefthook-win.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion .npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arkweid/lefthook",
"version": "0.6.7",
"version": "0.7.0",
"description": "Simple git hooks manager",
"main": "index.js",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions .rubygems/lefthook.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "lefthook"
spec.version = "0.6.7"
spec.version = "0.7.0"
spec.authors = ["A.A.Abroskin"]
spec.email = ["[email protected]"]

Expand All @@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
libexec/lefthook-linux
libexec/lefthook-win.exe
)

spec.licenses = ['MIT']
end
Binary file modified .rubygems/libexec/lefthook-linux
Binary file not shown.
Binary file modified .rubygems/libexec/lefthook-mac
Binary file not shown.
Binary file modified .rubygems/libexec/lefthook-win.exe
Binary file not shown.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## master (unreleased)

# 0.7.0 (2019-12-14)

- [PR](https://github.com/Arkweid/lefthook/pull/98) Support relative roots for monorepos. Thanks @jsmestad

# 0.6.7 (2019-12-14)

- [Commit](https://github.com/Arkweid/lefthook/commit/e898b5c8ba56c4d6f29a4d1f433baa1779a0845b)
Expand Down
16 changes: 3 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
# Contributing
First off, thanks for taking the time to contribute! Feel free to make Pull Request with you changes.

First off, thanks for taking the time to contribute! Feel free to make Pull Request with you changes.

# Requirements

Go >= 1.13.1
Ruby >= 2.x

# Proccess

1. Fork repo
2. git clone <forked_repo>
3. run commands:
```bash
go build
bundle install
```
4. Make changes
6. Test it
```bash
bundle exec rspec spec/
```
7. Push your changes in repo
3. Make changes
4. Push your changes in <forked_repo>
19 changes: 19 additions & 0 deletions docs/full_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,25 @@ Use LEFTHOOK_EXCLUDE={list of tags to be excluded} for that
LEFTHOOK_EXCLUDE=ruby,security git commit -am "Skip some tag checks"
```

## Concurrent files overrides

To prevent concurrent problems with read/write files try `flock`
utility.

```yml
# lefthook.yml
graphql-schema:
glob: "{Gemfile.lock,app/graphql/**/*}"
run: flock webpack/application/typings/graphql-schema.json yarn typings:update && git diff --exit-code --stat HEAD webpack/application/typings
frontend-tests:
glob: "**/*.js"
run: flock -s webpack/application/typings/graphql-schema.json yarn test --findRelatedTests {files}
frontend-typings:
glob: "**/*.js"
run: flock -s webpack/application/typings/graphql-schema.json yarn run flow focus-check {files}
```

## Capture ARGS from git in the script

Example script for `prepare-commit-msg` hook:
Expand Down

0 comments on commit d864a80

Please sign in to comment.