lefthook-openbsd-arm64 1.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +243 -0
- package/bin/lefthook +0 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+

|
|
2
|
+
[](https://coveralls.io/github/evilmartians/lefthook?branch=master)
|
|
3
|
+
|
|
4
|
+
# Lefthook
|
|
5
|
+
|
|
6
|
+
> The fastest polyglot Git hooks manager out there
|
|
7
|
+
|
|
8
|
+
<img align="right" width="147" height="100" title="Lefthook logo"
|
|
9
|
+
src="./logo_sign.svg">
|
|
10
|
+
|
|
11
|
+
A Git hooks manager for Node.js, Ruby and many other types of projects.
|
|
12
|
+
|
|
13
|
+
* **Fast.** It is written in Go. Can run commands in parallel.
|
|
14
|
+
* **Powerful.** It allows to control execution and files you pass to your commands.
|
|
15
|
+
* **Simple.** It is single dependency-free binary which can work in any environment.
|
|
16
|
+
|
|
17
|
+
📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
|
|
18
|
+
|
|
19
|
+
<a href="https://evilmartians.com/?utm_source=lefthook">
|
|
20
|
+
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
With **Go** (>= 1.22):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
go install github.com/evilmartians/lefthook@latest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
With **NPM**:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install lefthook --save-dev
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
With **Ruby**:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
gem install lefthook
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**[Installation guide](./docs/install.md)** with more ways to install lefthook: [apt](./docs/install.md#deb), [brew](./docs/install.md#homebrew), [winget](./docs/install.md#winget), and others.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Configure your hooks, install them once and forget about it: rely on the magic underneath.
|
|
47
|
+
|
|
48
|
+
#### TL;DR
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Configure your hooks
|
|
52
|
+
vim lefthook.yml
|
|
53
|
+
|
|
54
|
+
# Install them to the git project
|
|
55
|
+
lefthook install
|
|
56
|
+
|
|
57
|
+
# Enjoy your work with git
|
|
58
|
+
git add -A && git commit -m '...'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### More details
|
|
62
|
+
|
|
63
|
+
- [**Configuration**](./docs/configuration.md) for `lefthook.yml` config options.
|
|
64
|
+
- [**Usage**](./docs/usage.md) for **lefthook** CLI options, supported ENVs, and usage tips.
|
|
65
|
+
- [**Discussions**](https://github.com/evilmartians/lefthook/discussions) for questions, ideas, suggestions.
|
|
66
|
+
<!-- - [**Wiki**](https://github.com/evilmartians/lefthook/wiki) for guides, examples, and benchmarks. -->
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
## Why Lefthook
|
|
71
|
+
|
|
72
|
+
* ### **Parallel execution**
|
|
73
|
+
Gives you more speed. [Example](./docs/configuration.md#parallel)
|
|
74
|
+
|
|
75
|
+
```yml
|
|
76
|
+
pre-push:
|
|
77
|
+
parallel: true
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
* ### **Flexible list of files**
|
|
81
|
+
If you want your own list. [Custom](./docs/configuration.md#files) and [prebuilt](./docs/configuration.md#run) examples.
|
|
82
|
+
|
|
83
|
+
```yml
|
|
84
|
+
pre-commit:
|
|
85
|
+
commands:
|
|
86
|
+
frontend-linter:
|
|
87
|
+
run: yarn eslint {staged_files}
|
|
88
|
+
backend-linter:
|
|
89
|
+
run: bundle exec rubocop --force-exclusion {all_files}
|
|
90
|
+
frontend-style:
|
|
91
|
+
files: git diff --name-only HEAD @{push}
|
|
92
|
+
run: yarn stylelint {files}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
* ### **Glob and regexp filters**
|
|
96
|
+
If you want to filter list of files. You could find more glob pattern examples [here](https://github.com/gobwas/glob#example).
|
|
97
|
+
|
|
98
|
+
```yml
|
|
99
|
+
pre-commit:
|
|
100
|
+
commands:
|
|
101
|
+
backend-linter:
|
|
102
|
+
glob: "*.rb" # glob filter
|
|
103
|
+
exclude: '(^|/)(application|routes)\.rb$' # regexp filter
|
|
104
|
+
run: bundle exec rubocop --force-exclusion {all_files}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
* ### **Execute in sub-directory**
|
|
108
|
+
If you want to execute the commands in a relative path
|
|
109
|
+
|
|
110
|
+
```yml
|
|
111
|
+
pre-commit:
|
|
112
|
+
commands:
|
|
113
|
+
backend-linter:
|
|
114
|
+
root: "api/" # Careful to have only trailing slash
|
|
115
|
+
glob: "*.rb" # glob filter
|
|
116
|
+
run: bundle exec rubocop {all_files}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
* ### **Run scripts**
|
|
120
|
+
|
|
121
|
+
If oneline commands are not enough, you can execute files. [Example](./docs/configuration.md#script).
|
|
122
|
+
|
|
123
|
+
```yml
|
|
124
|
+
commit-msg:
|
|
125
|
+
scripts:
|
|
126
|
+
"template_checker":
|
|
127
|
+
runner: bash
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
* ### **Tags**
|
|
131
|
+
If you want to control a group of commands. [Example](./docs/configuration.md#tags).
|
|
132
|
+
|
|
133
|
+
```yml
|
|
134
|
+
pre-push:
|
|
135
|
+
commands:
|
|
136
|
+
packages-audit:
|
|
137
|
+
tags: frontend security
|
|
138
|
+
run: yarn audit
|
|
139
|
+
gems-audit:
|
|
140
|
+
tags: backend security
|
|
141
|
+
run: bundle audit
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
* ### **Support Docker**
|
|
145
|
+
|
|
146
|
+
If you are in the Docker environment. [Example](./docs/configuration.md#cmd-template).
|
|
147
|
+
|
|
148
|
+
```yml
|
|
149
|
+
pre-commit:
|
|
150
|
+
scripts:
|
|
151
|
+
"good_job.js":
|
|
152
|
+
runner: docker run -it --rm <container_id_or_name> {cmd}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
* ### **Local config**
|
|
156
|
+
|
|
157
|
+
If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [Description](./docs/usage.md#local-config).
|
|
158
|
+
|
|
159
|
+
```yml
|
|
160
|
+
# lefthook-local.yml
|
|
161
|
+
pre-push:
|
|
162
|
+
exclude_tags:
|
|
163
|
+
- frontend
|
|
164
|
+
commands:
|
|
165
|
+
packages-audit:
|
|
166
|
+
skip: true
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
* ### **Direct control**
|
|
170
|
+
|
|
171
|
+
If you want to run hooks group directly.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
$ lefthook run pre-commit
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
* ### **Your own tasks**
|
|
178
|
+
|
|
179
|
+
If you want to run specific group of commands directly.
|
|
180
|
+
|
|
181
|
+
```yml
|
|
182
|
+
fixer:
|
|
183
|
+
commands:
|
|
184
|
+
ruby-fixer:
|
|
185
|
+
run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
|
|
186
|
+
js-fixer:
|
|
187
|
+
run: yarn eslint --fix {staged_files}
|
|
188
|
+
```
|
|
189
|
+
```bash
|
|
190
|
+
$ lefthook run fixer
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
* ### **Optional output**
|
|
194
|
+
|
|
195
|
+
If you [don't want to see](./docs/configuration.md#skip_output) supporting information:
|
|
196
|
+
|
|
197
|
+
```yml
|
|
198
|
+
skip_output:
|
|
199
|
+
- meta #(version and which hook running)
|
|
200
|
+
- success #(output from runners with exit code 0)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Table of contents:
|
|
206
|
+
|
|
207
|
+
### Guides
|
|
208
|
+
|
|
209
|
+
* [Install with Node.js](./docs/install.md#node)
|
|
210
|
+
* [Install with Ruby](./docs/install.md#ruby)
|
|
211
|
+
* [Install with Homebrew](./docs/install.md#homebrew)
|
|
212
|
+
* [Install with Winget](./docs/install.md#winget)
|
|
213
|
+
* [Install for Debian-based Linux](./docs/install.md#deb)
|
|
214
|
+
* [Install for RPM-based Linux](./docs/install.md#rpm)
|
|
215
|
+
* [Install for Arch Linux](./docs/install.md#arch)
|
|
216
|
+
* [Usage](./docs/usage.md)
|
|
217
|
+
* [Configuration](./docs/configuration.md)
|
|
218
|
+
<!-- * [Troubleshooting](https://github.com/evilmartians/lefthook/wiki/Troubleshooting) -->
|
|
219
|
+
|
|
220
|
+
<!-- ### Migrate from -->
|
|
221
|
+
<!-- * [Husky](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky) -->
|
|
222
|
+
<!-- * [Husky and lint-staged](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky-with-lint-staged) -->
|
|
223
|
+
<!-- * [Overcommit](https://github.com/evilmartians/lefthook/wiki/Migration-from-overcommit) -->
|
|
224
|
+
|
|
225
|
+
### Examples
|
|
226
|
+
* [Simple script](https://github.com/evilmartians/lefthook/tree/master/examples/with_scripts)
|
|
227
|
+
* [Full features](https://github.com/evilmartians/lefthook/tree/master/examples/complete)
|
|
228
|
+
|
|
229
|
+
<!-- ### Benchmarks -->
|
|
230
|
+
<!-- * [vs Overcommit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-overcommit) -->
|
|
231
|
+
<!-- * [vs pre-commit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-pre-commit) -->
|
|
232
|
+
|
|
233
|
+
<!-- ### Comparison list -->
|
|
234
|
+
<!-- * [vs Overcommit, Husky, pre-commit](https://github.com/evilmartians/lefthook/wiki/Comparison-with-other-solutions) -->
|
|
235
|
+
|
|
236
|
+
### Articles
|
|
237
|
+
* [5 cool (and surprising) ways to configure Lefthook for automation joy](https://evilmartians.com/chronicles/5-cool-and-surprising-ways-to-configure-lefthook-for-automation-joy?utm_source=lefthook)
|
|
238
|
+
* [Lefthook: Knock your team’s code back into shape](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
|
|
239
|
+
* [Lefthook + Crystalball](https://evilmartians.com/chronicles/lefthook-crystalball-and-git-magic?utm_source=lefthook)
|
|
240
|
+
* [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)
|
|
241
|
+
* [Automatically linting docker containers](https://dev.to/nitzano/linting-docker-containers-2lo6?utm_source=lefthook)
|
|
242
|
+
* [Smooth PostgreSQL upgrades in DockerDev environments with Lefthook](https://dev.to/palkan_tula/smooth-postgresql-upgrades-in-dockerdev-environments-with-lefthook-203k?utm_source=lefthook)
|
|
243
|
+
* [Lefthook for React/React Native apps](https://blog.logrocket.com/deep-dive-into-lefthook-react-native?utm_source=lefthook)
|
package/bin/lefthook
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lefthook-openbsd-arm64",
|
|
3
|
+
"version": "1.7.13",
|
|
4
|
+
"description": "The OpenBSD ARM 64-bit binary for lefthook, git hooks manager.",
|
|
5
|
+
"preferUnplugged": false,
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/evilmartians/lefthook.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/evilmartians/lefthook/issues",
|
|
13
|
+
"email": "lefthook@evilmartians.com"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/evilmartians/lefthook#readme",
|
|
16
|
+
"os": [
|
|
17
|
+
"openbsd"
|
|
18
|
+
],
|
|
19
|
+
"cpu": [
|
|
20
|
+
"arm64"
|
|
21
|
+
]
|
|
22
|
+
}
|