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

オープン 初心者向け
#89 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1時間未満
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
bash, github-actions
領域
release

調査の方向性

.github/workflows/release.ymlを開き、publish-caskジョブのSHA検証ステップを見つけてください。既存のgrep -qコマンドを、issueで提供されているセクションを考慮したawkチェックに置き換えてください。workflowを確認するか、サンプルのcaskファイルを使ってローカルでシェルテストを実行し、構文を検証してください。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
0
フォーク
9
平均マージ
1日 14時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

unbound-force/replicator のほかの issue

unbound-force/replicator の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。