scripts-to-rule-them-all (#92)
All checks were successful
check / check (push) Successful in 4s
All checks were successful
check / check (push) Successful in 4s
Reviewed-on: #92 Co-authored-by: sneak <sneak@sneak.berlin> Co-committed-by: sneak <sneak@sneak.berlin>
This commit was merged in pull request #92.
This commit is contained in:
28
README.md
28
README.md
@@ -352,6 +352,32 @@ tracks reachability:
|
||||
|
||||
---
|
||||
|
||||
## Entrypoints
|
||||
|
||||
This repository adheres to the
|
||||
[Scripts to Rule Them All](https://github.com/github/scripts-to-rule-them-all)
|
||||
standard: normalized scripts in `script/` are the entrypoints for the
|
||||
development workflow, and the Makefile targets are thin shims that call
|
||||
them. We provide:
|
||||
|
||||
- `script/bootstrap` — install all dependencies (go, pinned
|
||||
golangci-lint and goimports, `go mod download`)
|
||||
- `script/setup` — make a fresh clone ready for development: bootstrap
|
||||
plus the git pre-commit hook
|
||||
- `script/projectname` — print the project name (used for the Docker
|
||||
image tag)
|
||||
- `script/test` — run the test suite (race detector, coverage)
|
||||
- `script/lint` — run golangci-lint
|
||||
- `script/fmt` — format all code (gofmt -s, goimports)
|
||||
- `script/fmt-check` — check formatting (read-only)
|
||||
- `script/check` — run test, lint, and fmt-check
|
||||
- `script/docker` — build the Docker image tagged via
|
||||
`script/projectname`
|
||||
- `script/cibuild` — CI entrypoint: plain `docker build .`
|
||||
- `script/precommit` — run by the git pre-commit hook; `go mod tidy`
|
||||
guard, then `script/check`
|
||||
- `script/install-precommit` — install the git pre-commit hook
|
||||
|
||||
## Building
|
||||
|
||||
```sh
|
||||
@@ -359,7 +385,7 @@ make build # Build binary to bin/dnswatcher
|
||||
make test # Run tests with race detector
|
||||
make lint # Run golangci-lint
|
||||
make fmt # Format code
|
||||
make check # Run all checks (format, lint, test, build)
|
||||
make check # Run all checks (test, lint, fmt-check)
|
||||
make clean # Remove build artifacts
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user