check / check (push) Waiting to run
The build no longer downloads Alpine.js. Its npm package tarball is committed as 3p/alpinejs-3.14.9.tgz, byte for byte the file script/fetch-assets downloaded, with the sha256 that script pinned. script/assets (make assets) extracts package/dist/cdn.min.js to the ignored static/js/alpine.min.js; script/test runs it, so make test, make check, the pre-commit hook and the Dockerfile get the file with no network access, and make build, run and dev run it too. Removed: script/fetch-assets, its Dockerfile step, static/vendor.sha256 and static/vendor_test.go. The README describes the new flow. Model: opus-5-5
17 lines
429 B
Bash
Executable File
17 lines
429 B
Bash
Executable File
#!/bin/sh
|
|
# script/assets: extract Alpine.js from its npm package tarball, committed
|
|
# in 3p/, to static/js/alpine.min.js, where go:embed reads it. The
|
|
# extracted file is not committed. script/test, make build and make dev run
|
|
# this first.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
tar -xzOf 3p/alpinejs-3.14.9.tgz package/dist/cdn.min.js \
|
|
>static/js/alpine.min.js
|
|
}
|
|
|
|
main "$@"
|