By convention, and in scripts-to-rule-them-all, script/install installs
the program itself. This script fetches the shared policy files into a
repo. The make target, the test names and the messages take the new
name. Behaviour is unchanged.
Model: opus-5-5
REPO_POLICIES said an ignore file lacking the closing comment keeps every
line the canonical file has never held; blank lines and comments are
dropped, so it now says entries, in a bullet of its own.
A new scenario covers an .editorconfig lacking the comment with no line
of its own, which the script replaces.
Model: opus-5-5
A .gitignore or .dockerignore lacking the canonical last line no longer
stops the script: each line the canonical file has never held goes
below the fetched content. An .editorconfig lacking it is replaced,
unless it has such a line, which stops the script.
The stub curl now writes files with no execute bit, as a real download
does, so the tests exercise the mode the script sets.
Model: opus-5-5
The install target stays in this repo's Makefile only. sneak/vaultik
already has an install target with another meaning, and every repo
still gets script/install.
Tests: a repo's own script/update-policy stops the script, and a repo
whose only JavaScript source is a .js or .mjs file gets the JavaScript
style guide.
Model: opus-5-5
A listed file the repo lacks is now written whole, with no keep rule.
A prompts/NAME.md goes to docs/NAME.md unless the repo keeps it at
NAME.md, and any other file goes to its own path. A language's files
are skipped when git tracks no source file of that language.
A listed path git ignores now stops the script before it writes.
README bullets split into short sentences, and a false sentence about
template repos deleted.
Model: opus-5-5
script/install replaced any tracked script/install or
script/update-policy in the target, including a repo's own unrelated
script. It now stops when such a file has a line the canonical file
has never held. An older shared copy is still replaced.
The padded file in the self-replacement test is now an earlier
canonical version, so the new stop does not catch it.
Model: opus-5-5
script/install fetches the policy files from prompts over HTTP and
writes them into a repo, installing itself and script/update-policy
there. script/update-policy fetches the current script/install, runs
it on its own repo and commits without pushing. The file list and the
rules for keeping a repo's own entries move to script/install.
Model: opus-5-5
One command fetches the policy files a repo vendors from `prompts`, keeps the repo's own entries, commits them by name and pushes. A line the canonical file has never held stops the script before anything is written, as does a failed fetch. The canonical `.dockerignore` gains the closing comment the script needs. `test/update-policy.sh` runs in the `test` phase of `Dockerfile`.
Judgement call: `.gitea/workflows/check.yml` and `.prettierrc` are replaced whole.
Limitation: a repo with its own `.golangci.yml` settings, such as `sneak/homoicon`, stops until those are dealt with.
Model: opus-5-5