|
|
@@ -1247,16 +1247,16 @@ What that means for an operator:
|
|
|
|
This repository adheres to the
|
|
|
|
This repository adheres to the
|
|
|
|
[Scripts to Rule Them All](https://github.com/github/scripts-to-rule-them-all)
|
|
|
|
[Scripts to Rule Them All](https://github.com/github/scripts-to-rule-them-all)
|
|
|
|
standard: normalized scripts in `script/` are the entrypoints for the
|
|
|
|
standard: normalized scripts in `script/` are the entrypoints for the
|
|
|
|
development workflow. Ten of the Makefile's seventeen targets are thin
|
|
|
|
development workflow. Nine of the Makefile's seventeen targets are thin
|
|
|
|
shims that call them; `build`, `run`, `dev`, `deps`, `clean`, `css` and
|
|
|
|
shims that call them; `assets`, `build`, `run`, `dev`, `deps`, `clean`,
|
|
|
|
`version` are inline commands with no script behind them, though `build`
|
|
|
|
`css` and `version` are inline commands with no script behind them,
|
|
|
|
and `version` both take their value from `script/version`.
|
|
|
|
though `build` and `version` both take their value from
|
|
|
|
|
|
|
|
`script/version`.
|
|
|
|
|
|
|
|
|
|
|
|
`script/test`, `make build` and `make dev` each run `script/assets`
|
|
|
|
`make test`, `make check`, `make build` and `make dev` each run
|
|
|
|
first, which writes the ignored `static/js/alpine.min.js` (see
|
|
|
|
`make assets` first, which writes the ignored `static/js/alpine.min.js`
|
|
|
|
[Third-party browser assets](#third-party-browser-assets)), so
|
|
|
|
(see [Third-party browser assets](#third-party-browser-assets)), so
|
|
|
|
`make test`, `make check` and the pre-commit hook work on a fresh clone
|
|
|
|
`make check` works on a fresh clone without a separate setup step.
|
|
|
|
without a separate step.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We provide:
|
|
|
|
We provide:
|
|
|
|
|
|
|
|
|
|
|
@@ -1264,8 +1264,6 @@ We provide:
|
|
|
|
- `script/setup` — make a fresh clone ready for development
|
|
|
|
- `script/setup` — make a fresh clone ready for development
|
|
|
|
(bootstrap, then install-precommit)
|
|
|
|
(bootstrap, then install-precommit)
|
|
|
|
- `script/projectname` — output the project name ("webhooker")
|
|
|
|
- `script/projectname` — output the project name ("webhooker")
|
|
|
|
- `script/assets` — extract Alpine.js from its tarball in `3p/` (see
|
|
|
|
|
|
|
|
[Third-party browser assets](#third-party-browser-assets))
|
|
|
|
|
|
|
|
- `script/test` — run the test suite
|
|
|
|
- `script/test` — run the test suite
|
|
|
|
- `script/lint` — run golangci-lint in Docker (see Linting below)
|
|
|
|
- `script/lint` — run golangci-lint in Docker (see Linting below)
|
|
|
|
- `script/fmt` — format all code (writes)
|
|
|
|
- `script/fmt` — format all code (writes)
|
|
|
@@ -1294,18 +1292,19 @@ publishes it. It is a dependency, not this repo's build output, so
|
|
|
|
The directory is `3p/` rather than `vendor/` because Go treats a root
|
|
|
|
The directory is `3p/` rather than `vendor/` because Go treats a root
|
|
|
|
`vendor/` directory as its module vendor directory.
|
|
|
|
`vendor/` directory as its module vendor directory.
|
|
|
|
|
|
|
|
|
|
|
|
`script/assets` (`make assets`) extracts the browser build,
|
|
|
|
`make assets` extracts the browser build, `package/dist/cdn.min.js`, from the
|
|
|
|
`package/dist/cdn.min.js`, from the tarball to `static/js/alpine.min.js`,
|
|
|
|
tarball to `static/js/alpine.min.js`, where `go:embed` picks it up.
|
|
|
|
where `go:embed` picks it up. `script/test`, `make build` and `make dev` run
|
|
|
|
`make test`, `make check`, `make build` and `make dev` run it first, and the
|
|
|
|
it first, and the Dockerfile builds through `make test` and `make build`, so
|
|
|
|
Dockerfile builds through them, so no build downloads anything. The extracted
|
|
|
|
nothing downloads Alpine.js. The extracted file is not committed, and
|
|
|
|
file is not committed, and `.dockerignore` keeps any host copy out of the
|
|
|
|
`.dockerignore` keeps any host copy out of the build context.
|
|
|
|
build context.
|
|
|
|
|
|
|
|
|
|
|
|
To move to a new version: download
|
|
|
|
To move to a new version: download
|
|
|
|
`https://registry.npmjs.org/alpinejs/-/alpinejs-<version>.tgz`, check it
|
|
|
|
`https://registry.npmjs.org/alpinejs/-/alpinejs-<version>.tgz`, check it
|
|
|
|
against the `dist.integrity` hash listed at
|
|
|
|
against the `dist.integrity` hash listed at
|
|
|
|
`https://registry.npmjs.org/alpinejs/<version>`, replace the tarball in `3p/`
|
|
|
|
`https://registry.npmjs.org/alpinejs/<version>`, replace the tarball in `3p/`
|
|
|
|
with it, update its file name in `script/assets`, and run `make check`.
|
|
|
|
with it, update its file name in the Makefile's `assets` target, and run
|
|
|
|
|
|
|
|
`make check`.
|
|
|
|
|
|
|
|
|
|
|
|
## Rationale
|
|
|
|
## Rationale
|
|
|
|
|
|
|
|
|
|
|
@@ -2884,7 +2883,7 @@ webhooker/
|
|
|
|
├── script/ # Scripts to Rule Them All entrypoints
|
|
|
|
├── script/ # Scripts to Rule Them All entrypoints
|
|
|
|
├── Dockerfile # Three stages: lint, test+build, Alpine runtime
|
|
|
|
├── Dockerfile # Three stages: lint, test+build, Alpine runtime
|
|
|
|
├── Dockerfile.lint # Lint-only image built by script/lint
|
|
|
|
├── Dockerfile.lint # Lint-only image built by script/lint
|
|
|
|
├── Makefile # 10 of 17 targets shim script/; 7 are inline
|
|
|
|
├── Makefile # 9 of 17 targets shim script/; 8 are inline
|
|
|
|
├── go.mod / go.sum
|
|
|
|
├── go.mod / go.sum
|
|
|
|
└── .golangci.yml # Linter configuration
|
|
|
|
└── .golangci.yml # Linter configuration
|
|
|
|
```
|
|
|
|
```
|
|
|
@@ -3277,5 +3276,3 @@ MIT
|
|
|
|
## Author
|
|
|
|
## Author
|
|
|
|
|
|
|
|
|
|
|
|
[@sneak](https://sneak.berlin)
|
|
|
|
[@sneak](https://sneak.berlin)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|