Closes #52. Adds `scripts/prune-release-assets.sh` and a best-effort step at the end of `build-binaries.yml`. - Lists every release page, sorts by creation date, skips the newest two published releases, deletes the rest's attachments via `DELETE /releases/{id}/assets/{asset_id}`. - Drafts never consume a keep slot, so a draft cannot strip the newest real release. - Releases, tags, source archives and release notes are never touched. - Nothing is excluded: SHA256SUMS and the wrappers go with the binaries. Checksums are only meaningful next to the files they cover, and the consumer drift-check reads the wrappers from the latest release, which stays complete. - Failures warn and the step has `continue-on-error: true` — a stale asset is cheaper than a blocked publish. `tests/prune-release-assets.sh` drives the script with a stub `curl`: keep window, out-of-order responses, drafts, no non-asset DELETE, short-page pagination stop, and both failure paths. Wired into `make check`. v0.2.0 still needs its 9 assets cleared by hand in the web UI, as the issue notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)Reviewed-on: #70 Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
27 lines
505 B
Makefile
27 lines
505 B
Makefile
SHELL := bash
|
|
.ONESHELL:
|
|
.PHONY: check test vet build smoke fmt
|
|
|
|
# Lint + unit tests. Mirrors the `test` CI job; runs green inside `nix develop`.
|
|
check: vet test
|
|
shellcheck scripts/*.sh
|
|
yamllint .gitea
|
|
bash tests/workflow-contract.sh
|
|
bash tests/prune-release-assets.sh
|
|
|
|
vet:
|
|
go vet ./...
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
# Build every cmd/* binary into ./bin (gitignored — binaries are CI artifacts).
|
|
build:
|
|
scripts/build-binaries.sh
|
|
|
|
smoke: build
|
|
scripts/crucible-smoke.sh
|
|
|
|
fmt:
|
|
gofmt -l -w cmd internal
|