Move the command line from cmd/bsdaily into internal/cli (closes #8)
check / check (push) Successful in 3m55s

cmd/bsdaily/main.go now only passes Version to cli.Main and exits with
the status it returns, as REPO_POLICIES.md requires of cmd/. The cobra
command, the flag rules and the date parsing moved unchanged into
internal/cli, so flags, help text, error messages, exit status and the
first log line stay as they were. The fallback to dev for an empty
version moved with them into cli.Main.

parseTargetDates is exported as ParseTargetDates so that a table test
outside the package can reach it; the test never touches the filesystem
or runs the extraction. README describes the new layout and TODO.md
records the step.

Model: opus-5-5
This commit is contained in:
2026-10-06 19:42:41 +00:00
parent f5c7614768
commit 29922dba51
6 changed files with 281 additions and 122 deletions
+6 -2
View File
@@ -14,11 +14,15 @@ pre-1.0
# Next Step
Expand tests beyond the compilation smoke test: unit tests for the extraction,
verification, and atomic-publish paths.
Expand the `internal/bsdaily` tests beyond the compilation smoke test: unit
tests for the extraction, verification, and atomic-publish paths.
# Completed Steps
- 2026-10-06: Moved the command line (flags, the rules for combining them, date
parsing) from `cmd/bsdaily` into `internal/cli`, with unit tests for the flag
rules and the dates; `cmd/bsdaily/main.go` is now a single call into it
(https://git.eeqj.de/sneak/bsdaily/issues/8).
- 2026-10-06: A plain `docker build .` and a host `make` build stamp the git tag
or short commit into the binary, which `bsdaily` logs on the first line of
every run and prints with `--version`