Rename script/fetch-policy to script/commit-current-upstream-policy-docs

sneak, on the PR: the script does more than fetch, and short names are
not wanted. The make target, the test names, the variables and the
messages take the new name. Behaviour is unchanged.

Model: opus-5-5
This commit is contained in:
clawbot authored and sneak committed 2026-11-15 06:11:27 +00:00
1 parent 9d1f727511
commit 62178c82a0
8 files changed
+139 -124

No files matched your search

+23 -20
View File
@@ -110,7 +110,7 @@ style conventions are in separate documents:
- `script/fmt-check`
- `script/check`
- `script/docker`
- `script/fetch-policy`
- `script/commit-current-upstream-policy-docs`
- `script/update-policy`
The scripts must be POSIX sh (`#!/bin/sh`, `set -eu`, no bashisms) so they
@@ -191,12 +191,13 @@ style conventions are in separate documents:
`script/check`.
- `script/install-precommit` installs the git pre-commit hook. The
`make hooks` target shims to it.
- `script/fetch-policy` fetches the vendored policy files from the `prompts`
repo over HTTP and writes them into the repo it is given, or its own repo
with no argument.
- `script/update-policy` fetches the current `script/fetch-policy` from the
`prompts` repo, runs it on its own repo and commits the result. It does
not push. The `make update-policy` target shims to it.
- `script/commit-current-upstream-policy-docs` fetches the vendored policy
files from the `prompts` repo over HTTP and writes them into the repo it
is given, or its own repo with no argument.
- `script/update-policy` fetches the current
`script/commit-current-upstream-policy-docs` from the `prompts` repo, runs
it on its own repo and commits the result. It does not push. The
`make update-policy` target shims to it.
- `script/projectname` (literally that filename) simply outputs the
project's name.
@@ -937,19 +938,20 @@ style conventions are in separate documents:
feature branch.
- One command brings a repo up to standards: `make update-policy`. It runs
`script/update-policy`, which fetches the current `script/fetch-policy` from
the head of `main` in the `prompts` repo and runs it on the repo. It then
commits the files that changed and does not push, so a person reviews and
pushes the commit.
`script/update-policy`, which fetches the current
`script/commit-current-upstream-policy-docs` from the head of `main` in the
`prompts` repo and runs it on the repo. It then commits the files that changed
and does not push, so a person reviews and pushes the commit.
`script/fetch-policy` fetches each vendored file from `prompts` over HTTP
and writes it into the repo. It skips a language's files when git tracks no
source file of that language. A file the repo lacks is written whole. A
`prompts/NAME.md` goes to `docs/NAME.md`, unless the repo keeps it at
`NAME.md`. It also writes `script/fetch-policy` and `script/update-policy`
into the repo, so a repo updated once can update itself. The list of
vendored files is at the top of `script/fetch-policy`. The script replaces
each file and keeps only the repo's own entries:
`script/commit-current-upstream-policy-docs` fetches each vendored file from
`prompts` over HTTP and writes it into the repo. It skips a language's files
when git tracks no source file of that language. A file the repo lacks is
written whole. A `prompts/NAME.md` goes to `docs/NAME.md`, unless the repo
keeps it at `NAME.md`. It also writes
`script/commit-current-upstream-policy-docs` and `script/update-policy` into
the repo, so a repo updated once can update itself. The list of vendored
files is at the top of `script/commit-current-upstream-policy-docs`. The
script replaces each file and keeps only the repo's own entries:
- in `.gitignore`, `.editorconfig` and `.dockerignore`: the lines below the
comment that ends the canonical file
- in a `.gitignore` or `.dockerignore` lacking that comment: every entry the
@@ -1182,7 +1184,8 @@ style conventions are in separate documents:
- `Makefile`
- `script/` entrypoints (`bootstrap`, `setup`, `projectname`, `test`,
`lint`, `fmt`, `fmt-check`, `check`, `docker`, `cibuild`, `precommit`,
`install-precommit`, `fetch-policy`, `update-policy`)
`install-precommit`, `commit-current-upstream-policy-docs`,
`update-policy`)
- `Dockerfile`, `.dockerignore`
- `.gitea/workflows/check.yml`
- Go: `go.mod`, `go.sum`, `.golangci.yml`