check / check (push) Failing after 3s
Ported per the library's v2-to-v3 migration guide: the app is a root cli.Command, actions take a context and the command, and flag environment variables become value sources. -v, -q and the version flag are marked local so that, as before, only the commands that define them accept them. go mod tidy raises testify to v1.12.1, which v3 requires. The urfave_cli_no_docs build tag is dropped from script/build and the Dockerfile; v3 has no such tag. v3 no longer refuses a flag given under two of its names, so -v --verbose now gives debug output, and the test that pinned the refusal becomes a TestVerboseCount case. Help text follows v3's templates. Model: opus-5-5
19 lines
591 B
Python
Executable File
19 lines
591 B
Python
Executable File
#!/bin/sh
|
|
# script/build: build the mfer binary into bin/mfer, stamped with the
|
|
# revision `mfer version` prints, derived as script/docker derives it.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
# Own line: a failing command substitution inside an argument does
|
|
# not trip `set -e`, so the inline form degrades silently to an
|
|
# empty constant.
|
|
version="$(git describe --tags --always --dirty 2>/dev/null || true)"
|
|
[ -n "$version" ] || version="unknown"
|
|
go build -ldflags "-X main.Gitrev=$version" -o bin/mfer ./cmd/mfer
|
|
}
|
|
|
|
main "$@"
|