Rename script/fetch-policy to script/commit-current-upstream-policy-docs
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
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:
1 parent
917fe4bc1d
commit
ed60414378
9 files changed
+145
-129
No files matched your search
@@ -1,12 +1,13 @@
|
||||
#!/bin/sh
|
||||
# script/update-policy: bring this repo up to standards. It fetches the
|
||||
# current script/fetch-policy from the prompts repo over HTTP, runs it
|
||||
# on this repo and commits the files it wrote. It does not push.
|
||||
# Identical in all repos. Our own extension to scripts-to-rule-them-all.
|
||||
# current script/commit-current-upstream-policy-docs from the prompts
|
||||
# repo over HTTP, runs it on this repo and commits the files it wrote.
|
||||
# It does not push. Identical in all repos. Our own extension to
|
||||
# scripts-to-rule-them-all.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
FETCH_POLICY_URL="https://git.eeqj.de/sneak/prompts/raw/branch/main/script/fetch-policy"
|
||||
COMMIT_CURRENT_UPSTREAM_POLICY_DOCS_URL="https://git.eeqj.de/sneak/prompts/raw/branch/main/script/commit-current-upstream-policy-docs"
|
||||
|
||||
die() {
|
||||
echo "update-policy: $*" >&2
|
||||
@@ -22,10 +23,11 @@ main() {
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
curl --fail --silent --show-error --max-time 60 \
|
||||
--output "$tmp/fetch-policy" "$FETCH_POLICY_URL" ||
|
||||
die "cannot fetch $FETCH_POLICY_URL"
|
||||
--output "$tmp/commit-current-upstream-policy-docs" \
|
||||
"$COMMIT_CURRENT_UPSTREAM_POLICY_DOCS_URL" ||
|
||||
die "cannot fetch $COMMIT_CURRENT_UPSTREAM_POLICY_DOCS_URL"
|
||||
|
||||
sh "$tmp/fetch-policy" "$ROOT" > "$tmp/written"
|
||||
sh "$tmp/commit-current-upstream-policy-docs" "$ROOT" > "$tmp/written"
|
||||
commit="$(head -n 1 "$tmp/written")"
|
||||
paths="$(tail -n +2 "$tmp/written")"
|
||||
|
||||
|
||||
Reference in new issue
Block a user