Skip to content

기능: Homebrew 설치 지원 — 저장소 자체 tap + 릴리스 시 formula 자동 갱신 - #24

Merged
entelecheia merged 2 commits into
mainfrom
feat/homebrew
Jul 26, 2026
Merged

기능: Homebrew 설치 지원 — 저장소 자체 tap + 릴리스 시 formula 자동 갱신#24
entelecheia merged 2 commits into
mainfrom
feat/homebrew

Conversation

@entelecheia

Copy link
Copy Markdown
Member

brewhwp를 설치할 수 있게 한다. 별도 homebrew-* 저장소 없이 이 저장소를 tap으로 쓴다.

brew tap staixbwlb/hwp https://github.com/STAIxBWLB/hwp-cli
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으로 formula의 version·sha256을 치환. sha는 직전 url 라인의 타깃 트리플에 매칭해 바꾸고, 하나라도 치환 못 하면 실패한다(오래된 체크섬이 조용히 남는 것 방지). --self-test 포함.
  • release.ymlupdate-formula — 자산 업로드 완료 후 위 스크립트로 formula를 갱신해 main에 커밋. 태그를 밀 때마다 brew가 최신 버전을 따라간다. 잡이 실패해도 릴리스 자체는 유효하고 로컬 재실행으로 복구된다.
  • README — brew 설치 절차 + 릴리스 절차의 formula 자동 갱신 명시.

검증

  • scripts/update_formula.sh --self-test 통과(치환 + 누락 타깃 검출).
  • 실제 v0.2.0 릴리스 체크섬으로 실행 → formula 무변경: 커밋된 sha256이 실제 릴리스 자산과 일치함을 확인.
  • ruby -c Formula/hwp.rb, release.yml YAML 파싱 통과.
  • 로컬 brew install --formula ./Formula/hwp.rb 설치·동작 확인(아래 코멘트에 결과).

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 파싱 통과.
Copilot AI review requested due to automatic review settings July 26, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +94 to +95
ver="${GITHUB_REF_NAME#v}"
scripts/update_formula.sh "$ver"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@entelecheia

Copy link
Copy Markdown
Member Author

로컬 검증 결과: brew tap staixbwlb/hwp <URL> → 이 브랜치 체크아웃 → brew install staixbwlb/hwp/hwp 설치 성공(v0.2.0 자산), brew test 통과(--version + md→hwpx 생성 + cat 재읽기 3단계), brew style 무결점(desc 규칙 위반 1건 수정 반영). brew info hwp 짧은 이름도 이 tap으로 해석된다.

@entelecheia
entelecheia merged commit a37ba33 into main Jul 26, 2026
5 of 6 checks passed
@entelecheia
entelecheia deleted the feat/homebrew branch July 26, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants