`--frozen` to expect no changes in README
Profpatsch opened this issue · 0 comments
Profpatsch commented
This is another one for CI:
mdsh --frozen
should check whether the new README
is exactly the same as the old one, and fail if they are not the same.
We can achieve something similar with a trivial:
git diff --exit-code
after running mdsh
, but that picks up all files that have been modified by the commands in the md file, which might or might not be what the user wants.
Alternatively, a wrapper script like
INPUT="$1"
tmp=$(mktemp)
cp "$INPUT" "$tmp"
mdsh "$INPUT"
diff "$tmp" "$INPUT"
might also be enough for most use cases.
I’m not sure whether --frozen
is necessary in the end, but if it isn’t the best practices should be documented.