bug(release): strengthen post-patch cask validation to be stanza-aware

Open Beginner friendly
#89 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
Under an hour
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
bash, github-actions
Domain
release

Research direction

Open .github/workflows/release.yml and locate the publish-cask job's SHA validation step. Replace the existing grep -q command with the stanza-aware awk check provided in the issue. Verify the syntax by reviewing the workflow or running a local shell test with a sample cask file.

Written by the indexing model from the issue text.

Description

bug github_actions

Context

The publish-cask job in release.yml validates the SHA patch with:

grep -q "sha256 \"$ARM64_SHA\"" "$CASK_FILE"

This checks that the SHA exists anywhere in the cask file, not specifically in the darwin_arm64 stanza. Prior to #86, this grep was falsely passing — it found the SHA in the wrong stanza (linux_amd64) and reported success.

With #86 merged the patching logic is correct, but the validation is still not stanza-aware. A future regression in the AWK script could silently pass this check again.

Suggested fix

Replace the grep with a stanza-aware check, e.g.:

if ! awk '/darwin_arm64/{found=1} found && /sha256.*'"$ARM64_SHA"'/{ok=1} END{exit !ok}' "$CASK_FILE"; then
  echo "::error::SHA not found in darwin_arm64 stanza"
  exit 1
fi

Priority

Low — the core bug is fixed by #86. This is a defense-in-depth improvement

Dominant language
Go
Stars
0
Forks
9
Avg merge
1d 14h
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from unbound-force/replicator

All issues in unbound-force/replicator

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.