Skip to content

Commit

Permalink
update to 0.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Abroskin committed Nov 9, 2019
1 parent c85ec9d commit 6003317
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/lefthook-local.yml
/lefthook.yml
lefthook
cplefthook

tmp/
dist/
Expand Down
24 changes: 19 additions & 5 deletions .npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

# Lefthook

> The fastest polyglot Git hooks manager out there
<img align="right" width="147" height="100" title="Lefthook logo"
src="./logo_sign.svg">

Fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects.

* **Fast.** It is written in Go. Can run commands in parallel.
* **Powerful.** With a few lines in the config you can check only the changed files on `pre-push` hook.
* **Simple.** It is single dependency-free binary which can work in any environment.

📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)

```yml
# On `git push` lefthook will run spelling and links check for all of the changed files
pre-push:
Expand Down Expand Up @@ -57,13 +64,13 @@ pre-commit:
frontend-linter:
run: yarn eslint {staged_files}
backend-linter:
run: bundle exec rubocop {all_files}
run: bundle exec rubocop --force-exclusion {all_files}
frontend-style:
files: git diff --name-only HEAD @{push}
run: yarn stylelint {files}
```
* ### **Glob and regexp filtres**
* ### **Glob and regexp filters**
If you want to filter list of files.
```yml
Expand All @@ -72,7 +79,7 @@ pre-commit:
backend-linter:
glob: "*.rb" # glob filter
exclude: "application.rb|routes.rb" # regexp filter
run: bundle exec rubocop {all_files}
run: bundle exec rubocop --force-exclusion {all_files}
```
* ### **Run scripts**
Expand Down Expand Up @@ -141,7 +148,7 @@ If you want to run specific group of commands directly.
fixer:
commands:
ruby-fixer:
run: bundle exec rubocop --safe-auto-correct {staged_files}
run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
js-fixer:
run: yarn eslint --fix {staged_files}
```
Expand Down Expand Up @@ -172,6 +179,13 @@ $ lefthook run fixer

### Benchmarks
* [vs Overcommit](https://github.com/Arkweid/lefthook/wiki/Benchmark-lefthook-vs-overcommit)
* [vs pre-commit](https://github.com/Arkweid/lefthook/wiki/Benchmark-lefthook-vs-pre-commit)

### Comparison list
* [vs Overcommit and Husky](https://github.com/Arkweid/lefthook/wiki/Comparison-with-other-solutions)
* [vs Overcommit, Husky, pre-commit](https://github.com/Arkweid/lefthook/wiki/Comparison-with-other-solutions)

### Articles
* [Lefthook: Knock your team’s code back into shape](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
* [Lefthook + Crystalball](https://evilmartians.com/chronicles/lefthook-crystalball-and-git-magic?utm_source=lefthook)
* [Keeping OSS documentation in check with docsify, Lefthook, and friends](https://evilmartians.com/chronicles/keeping-oss-documentation-in-check-with-docsify-lefthook-and-friends?utm_source=lefthook)

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.3",
"version": "0.6.4",
"description": "Simple git hooks manager",
"main": "index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion .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.3"
spec.version = "0.6.4"
spec.authors = ["A.A.Abroskin"]
spec.email = ["[email protected]"]

Expand Down
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.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## master (unreleased)

- [Commit](https://github.com/Arkweid/lefthook/commit/fee173d62ad9a85a7b3fc2ea6d8c1c00728aaea3) Add shell escapig for filenames. Thanks @asottile
# 0.6.4 (2019-07-15)

- [PR](https://github.com/Arkweid/lefthook/pull/84) Fix return value from shell exit. Thanks @HaiD84

- [PR](https://github.com/Arkweid/lefthook/pull/86) Support postinstall script for npm installation for monorepos. Thanks @sHooKDT

- [PR](https://github.com/Arkweid/lefthook/pull/82) Now relative path to scripts supported. Thanks @AlexeyMatskevich

Expand Down
1 change: 1 addition & 0 deletions cmd/run_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
skipConfigKey string = "skip"
skipEmptyConfigKey string = "skip_empty"
filesConfigKey string = "files"
colorsConfigKey string = "colors"
parallelConfigKey string = "parallel"
subFiles string = "{files}"
subAllFiles string = "{all_files}"
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

const (
version string = "0.6.3"
version string = "0.6.4"
)

// versionCmd represents the version command
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
Expand Down

0 comments on commit 6003317

Please sign in to comment.