Every tracked file that can carry a comment (880 of them) now opens with "Author: Guoliang Chen, a Senior Digital Design Engineer" and closes with "Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com", in the file's own comment syntax. No behaviour change: the diff outside the version bump and changelogs is comment lines only. - tools/stamp_author.py: writes the lines; idempotent, `--check` lists what is missing. Headers go under a shebang and under Markdown front matter. - Left alone: test fixtures, cases and snapshots (byte-exact inputs), JSON and JSONL, logs, images, lockfiles, docs/site/dist (regenerated) and the LICENSE files (already carry the copyright line). - tools/linux_check.sh: --help reads its header from line 3, now that the author line sits under the shebang. - tools/gates.sh green on this tree: 5 545 tests, corpus 814/6 as before. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
46 lines
1.9 KiB
Bash
Executable File
46 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
|
# Reduce a built dist/ directory to the assets a release publishes.
|
|
#
|
|
# Usage: tools/prune_release_assets.sh <dist-dir> <version>
|
|
# tools/prune_release_assets.sh dist 0.10.0
|
|
#
|
|
# A release page carries the seven .vsix packages and SHA256SUMS, nothing else
|
|
# (docs/features/ci-release): the extension is the product, and the loose
|
|
# per-triple binaries exist only so the packages can be built and audited from
|
|
# them. Every package is checked by name first -- tools/release.sh would have
|
|
# failed earlier, but a release quietly missing a platform is exactly the
|
|
# failure this step exists to prevent -- then SHA256SUMS is *filtered* down to
|
|
# its .vsix lines rather than recomputed, so the hashes published are the ones
|
|
# tools/audit_artifacts.sh already gated on, everything else is deleted, and
|
|
# what remains is re-verified the way a downloader would.
|
|
#
|
|
# Exit status: 0 if all seven packages were present and verified.
|
|
|
|
set -eu
|
|
|
|
[ $# -eq 2 ] || { echo "usage: $0 <dist-dir> <version>" >&2; exit 2; }
|
|
dist=$1
|
|
version=$2
|
|
[ -d "$dist" ] || { echo "no dist directory at $dist" >&2; exit 2; }
|
|
[ -f "$dist/SHA256SUMS" ] || { echo "no SHA256SUMS in $dist" >&2; exit 2; }
|
|
|
|
cd "$dist"
|
|
|
|
# The universal fallback, the five platform packages, and the all-platforms one.
|
|
# Each is a must: a missing platform package strands that platform's users on
|
|
# "install a binary yourself", which is the whole thing these packages fix.
|
|
for suffix in "" -darwin-arm64 -darwin-x64 -linux-x64 -linux-arm64 -win32-x64 -all; do
|
|
[ -f "lucisv-$version$suffix.vsix" ] || {
|
|
echo "missing lucisv-$version$suffix.vsix" >&2
|
|
exit 1
|
|
}
|
|
done
|
|
|
|
grep '\.vsix$' SHA256SUMS > SHA256SUMS.tmp
|
|
mv SHA256SUMS.tmp SHA256SUMS
|
|
find . -type f ! -name '*.vsix' ! -name SHA256SUMS -delete
|
|
shasum -a 256 -c SHA256SUMS
|
|
|
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|