#!/bin/sh # script/tidy: write go.mod and go.sum as `go mod tidy` writes them, which # the test phase of the Dockerfile checks. This builds the Dockerfile's # tidy-files stage, which holds the two files alone, and --output writes # them into the working tree. The build makes no image, so it has no tag. set -eu ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" main() { cd "$ROOT" docker build \ --target tidy-files \ --output "type=local,dest=$ROOT" . } main "$@"