기능: Homebrew 설치 지원 — 저장소 자체 tap + 릴리스 시 formula 자동 갱신 - #24
Conversation
brew로 hwp를 설치할 수 있게 한다. 별도 homebrew-* 저장소 없이 이 저장소를 tap으로 쓴다(brew tap staixbwlb/hwp <URL> → brew install hwp). - Formula/hwp.rb: 릴리스 사전 빌드 아카이브를 받아 설치(Rust 툴체인 불요). macOS arm64/x86_64 + Linux x86_64. test 블록은 --version만 보지 않고 md→hwpx 생성 후 cat으로 본문을 되읽어 실제 동작을 확인한다. caveats로 CJK 폰트 안내. - scripts/update_formula.sh: 릴리스 자산의 .sha256으로 version·sha256 치환. sha는 직전 url 라인의 타깃 트리플에 매칭해 바꾸고, 하나라도 못 바꾸면 실패한다 (오래된 체크섬이 조용히 남는 것 방지). --self-test 포함. - release.yml update-formula 잡: 자산 업로드 후 위 스크립트로 formula를 갱신해 main에 커밋. 실패해도 릴리스 자체는 유효하며 로컬 재실행으로 복구 가능. - README: brew 설치 절차 + 릴리스 절차에 formula 자동 갱신 명시. 검증: update_formula.sh --self-test 통과, 실제 v0.2.0 릴리스 체크섬으로 실행 시 formula 무변경(= 커밋된 sha가 실제 자산과 일치). ruby -c / YAML 파싱 통과.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ed753d4a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ver="${GITHUB_REF_NAME#v}" | ||
| scripts/update_formula.sh "$ver" |
There was a problem hiding this comment.
Prevent older release runs from downgrading the formula
If an older release workflow is rerun, or two tagged releases finish out of order, this job checks out the latest main but unconditionally patches it to the triggering tag's version. The subsequent push can therefore replace a newer Homebrew formula with an older version and checksums, causing new brew install users to receive the stale release; compare the current formula version before updating, or otherwise enforce monotonic release ordering.
Useful? React with 👍 / 👎.
|
로컬 검증 결과: |
brew로hwp를 설치할 수 있게 한다. 별도homebrew-*저장소 없이 이 저장소를 tap으로 쓴다.변경
Formula/hwp.rb— 릴리스 사전 빌드 아카이브를 받아 설치하므로 Rust 툴체인이 필요 없다. macOS(arm64·x86_64) + Linux x86_64.test블록은--version만 보지 않고 md→hwpx 생성 후cat으로 본문을 되읽어 실제 동작을 확인한다.caveats로 렌더용 CJK 폰트 안내.scripts/update_formula.sh— 릴리스 자산의.sha256으로 formula의 version·sha256을 치환. sha는 직전url라인의 타깃 트리플에 매칭해 바꾸고, 하나라도 치환 못 하면 실패한다(오래된 체크섬이 조용히 남는 것 방지).--self-test포함.release.yml의update-formula잡 — 자산 업로드 완료 후 위 스크립트로 formula를 갱신해 main에 커밋. 태그를 밀 때마다 brew가 최신 버전을 따라간다. 잡이 실패해도 릴리스 자체는 유효하고 로컬 재실행으로 복구된다.검증
scripts/update_formula.sh --self-test통과(치환 + 누락 타깃 검출).ruby -c Formula/hwp.rb, release.yml YAML 파싱 통과.brew install --formula ./Formula/hwp.rb설치·동작 확인(아래 코멘트에 결과).