check / check (push) Waiting to run
A blob is written in full to a temporary file in $TMPDIR and uploaded once finished, not streamed to storage, and the metadata export works on a copy of the local index there. The README, ARCHITECTURE.md and config.example.yml now say a backup needs free space there of the larger of blob_size_limit and about three times the size of the local index. Also corrected: the snapshot ID format, what restore reads and how incomplete snapshots are removed in docs/DATAMODEL.md, what source_path holds, the index_path default, the config search order in the snapshot create help, what snapshot remove cleans up in the prune help, how the release installs Go, and the script/release and script/fmt-check comments. Model: opus-5-5
29 lines
894 B
Bash
Executable File
29 lines
894 B
Bash
Executable File
#!/bin/sh
|
|
# script/fmt-check: check formatting (read-only). Fails instead of
|
|
# writing. It checks every Go file outside .tool, which is more than
|
|
# script/fmt formats: `go fmt ./...` skips `testdata` directories and
|
|
# files and directories whose names start with `.` or `_`. Fix a file
|
|
# only this reports with `gofmt -w`.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
# Where script/bootstrap installs Go when the host has none.
|
|
PATH="$PATH:$ROOT/.tool/go/bin"
|
|
# .tool/go holds that toolchain's own sources, which are not ours.
|
|
if ! unformatted="$(find . -path ./.tool -prune -o -name '*.go' -type f \
|
|
-exec gofmt -l {} +)"; then
|
|
echo "fmt-check: gofmt failed" >&2
|
|
exit 1
|
|
fi
|
|
if [ -n "$unformatted" ]; then
|
|
echo "Files not formatted:" >&2
|
|
echo "$unformatted" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
main "$@"
|