article3 - webispy/aln GitHub Wiki
Homebrew๋ macOS๋ฅผ ์ํ ์คํ ์์ค ํจํค์ง ๊ด๋ฆฌ์๋ก, ๊ฐ๋ฐ์๋ค ์ฌ์ด์์ ํ์ ๋๊ตฌ๋ก ์๋ฆฌ ์ก์์ต๋๋ค. CLI ์ธํฐํ์ด์ค๋ฅผ ํตํด ๋ค์ํ ์ํํธ์จ์ด๋ฅผ ์ฝ๊ฒ ์ค์น, ์ ๋ฐ์ดํธ, ๊ด๋ฆฌํ ์ ์๊ฒ ํด์ฃผ๋ฉฐ, ์์กด์ฑ ๋ฌธ์ ๋ ์๋์ผ๋ก ํด๊ฒฐ๋ฉ๋๋ค. ์ด๋ฌํ ํธ์์ฑ ๋๋ถ์ Homebrew๋ macOS ์ฌ์ฉ์๋ค, ํนํ ๊ฐ๋ฐ์๋ค์๊ฒ ์์ด์๋ ์ ๋ ๋๊ตฌ๊ฐ ๋์์ต๋๋ค.
์ด๋ฒ ๊ธ์์๋ ์ด์ ์ ์๊ฐํ ALN(Amazing Lucky Numbers) ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ macOS์ฉ Homebrew ํจํค์ง๋ก ๋ง๋ค๊ณ , TAP์ ํตํด bottle๋ก ๋ฐฐํฌํ๋ ๊ณผ์ ์ ์์ธํ ๋ค๋ฃจ๊ฒ ์ต๋๋ค. Formula ์์ฑ, bottle ๋น๋, TAP ์ ์ฅ์ ์ค์ , ๊ทธ๋ฆฌ๊ณ ์ต์ข ์ ์ผ๋ก ์ฌ์ฉ์๋ค์ด ์ฝ๊ฒ ์ค์นํ ์ ์๋๋ก ํจํค์ง๋ฅผ ๋ฐฐํฌํ๋ ๋ฐฉ๋ฒ๊น์ง ๋จ๊ณ๋ณ๋ก ์ค๋ช ํ๊ฒ ์ต๋๋ค.
Homebrew๋ ๋งฅ์ฃผ ์์กฐ์์ ์๊ฐ์ ๋ฐ์ ์ด๋ฆ์ด ์ง์ด์ก์ผ๋ฉฐ, ๋ง์ ์ฉ์ด๋ค์ด ๋งฅ์ฃผ ์ ์กฐ ๊ณผ์ ๊ณผ ๊ด๋ จ์ด ์์ต๋๋ค. ์ค์ ๋ก brew
๋ช
๋ น์ผ๋ก ํจํค์ง๋ฅผ ์ค์นํ ๋ ํฐ๋ฏธ๋์ ๋งฅ์ฃผ ์์ด์ฝ์ด ํ์๋ฉ๋๋ค.
๊ฐ ์ฉ์ด์ ๋ํด Homebrew์์์ ์๋ฏธ์ ๋งฅ์ฃผ ์์กฐ์์์ ์๋ฏธ๋ฅผ ํจ๊ป ์ค๋ช ํ๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
Homebrew: macOS๋ฅผ ์ํ ์คํ ์์ค ํจํค์ง ๊ด๋ฆฌ ์์คํ
- ๊ฐ์ ์์ ์ง์ ๋ง๋๋ ์์ ๋งฅ์ฃผ
-
Brew: ํจํค์ง๋ฅผ ์ค์นํ๊ฑฐ๋ ๊ด๋ฆฌํ๋ ์ฃผ์ ๋ช
๋ น์ด
- ๋งฅ์ฃผ๋ฅผ ๋ง๋๋ ๊ณผ์ ์์ฒด
-
Formula: ํจํค์ง ์ค์น ๋ฐฉ๋ฒ์ ์ ์ํ Ruby ์คํฌ๋ฆฝํธ ํ์ผ
- ๋งฅ์ฃผ ์ ์กฐ๋ฅผ ์ํ ์ฌ๋ฃ์ ๋ฐฉ๋ฒ์ ๊ธฐ์ ํ ๋ ์ํผ
-
Cellar: Homebrew๊ฐ ํจํค์ง๋ฅผ ์ค์นํ๋ ๋๋ ํ ๋ฆฌ (๊ธฐ๋ณธ ์์น: Intel mac - /usr/local/Cellar, Apple Silicon Mac - /opt/homebrew/Cellar)
- ๋งฅ์ฃผ๋ฅผ ์ ์ฅํ๊ณ ์์ฑ์ํค๋ ๊ณต๊ฐ
-
Keg: Cellar ๋ด์ ํน์ ๋ฒ์ ์ ํจํค์ง ์ค์น ๋๋ ํ ๋ฆฌ
- ๋งฅ์ฃผ๋ฅผ ์ ์ฅํ๊ณ ์๋นํ๋ ๋ฐ ์ฌ์ฉ๋๋ ํต
-
Tap: ๊ณต์ ์ ์ฅ์ ์ธ์ ์ฌ์ฉ์๊ฐ ์ถ๊ฐํ์ฌ ์ฌ์ฉํ ์ ์๋ Formula ์ ์ฅ์
- ๋งฅ์ฃผ๋ฅผ ๋ฐ๋ฅด๋ ๋ฐ ์ฌ์ฉ๋๋ ๋ฐธ๋ธ๋ ๊ผญ์ง
-
Cask: GUI ์ ํ๋ฆฌ์ผ์ด์
์ ๊ด๋ฆฌํ๊ธฐ ์ํ Homebrew์ ํ์ฅ ๊ธฐ๋ฅ
- ๋๋์ ๋งฅ์ฃผ๋ฅผ ์ ์ฅํ๊ณ ์ด๋ฐํ๋ ๋ฐ ์ฌ์ฉ๋๋ ํฐ ํต
-
Bottle: ๋ฏธ๋ฆฌ ์ปดํ์ผ๋ ํจํค์ง ๋ฒ์ ์ผ๋ก, ์ค์น ์๊ฐ์ ํฌ๊ฒ ๋จ์ถ์ํด
- ๋งฅ์ฃผ๋ฅผ ๋ด์ ํ๋งคํ๊ฑฐ๋ ๋ณด๊ดํ๋ ์ ๋ฆฌ๋ณ
Homebrew ๊ธฐ๋ฐ์ ํจํค์ง๋ฅผ ๋ง๋ค์ด์ ๋ฐฐํฌํ๋ ๊ณผ์ ์ ๋งฅ์ฃผ ์ฉ์ด๋ก ๋ค์ ์ค๋ช ํ๋ฉด ์๋์ ๊ฐ์ต๋๋ค.
- ํจํค์ง ์์ฑ ์คํฌ๋ฆฝํธ ์ ์
- ๋งฅ์ฃผ ์ ์กฐ๋ฅผ ์ํ ์ฌ๋ฃ์ ๋ฐฉ๋ฒ์ ๊ธฐ์ ํ ๋ ์ํผ(Formula) ์์ฑ
- ํจํค์ง ๋น๋ ๋ฐ ์ ์ฅ์(Github Release)์ ์
๋ก๋
- ๋งฅ์ฃผ๋ฅผ ์ ์กฐํ ํ ์ ๋ฆฌ๋ณ(Bottle)์ ๋ด์ ์ค๋น
- Github ์ ์ฅ์๋ฅผ ์ด์ฉํด Tap ์ถ๊ฐ ๋ฐ ํจํค์ง ์ค์น
- ๋งฅ์ฃผ ์์กฐ์ฅ์ ํตํด ๋งฅ์ฃผ๋ฅผ ๋ฐ์์ด(Tap). ๋ณ์ผ๋ก ๋ฐ๋ก ๋ฐ๊ฑฐ๋(Bottle) ๋ ์ํผ(Formula)๋ก ์ง์ ์ ์กฐ
Apple Silicon Mac ๊ธฐ์ค์ผ๋ก Homebrew๋ /opt/homebrew
๋๋ ํ ๋ฆฌ๋ฅผ ์ฌ์ฉํ๋๋ฐ, ์ธ๋ถ ๋๋ ํ ๋ฆฌ๋ ์๋์ ๊ฐ์ต๋๋ค.
-
/opt/homebrew/
(Git ์ ์ฅ์): ์ด ๋๋ ํ ๋ฆฌ๋ Homebrew์ ๋ฃจํธ ๋๋ ํ ๋ฆฌ์ด๋ฉฐ, ๋์์ Git ์ ์ฅ์์ ๋๋ค. ์ด๋ฅผ ํตํด Homebrew ์์ฒด์ ์ ๋ฐ์ดํธ์ ๋ฒ์ ๊ด๋ฆฌ๊ฐ ์ด๋ฃจ์ด์ง๋๋ค. -
/opt/homebrew/bin/
: Homebrew๋ก ์ค์นํ ํจํค์ง์ ์คํ ํ์ผ๋ค์ด ์ฌ๋ณผ๋ฆญ ๋งํฌ๋ก ์์นํฉ๋๋ค. -
/opt/homebrew/Cellar/
: ์ค์ ํจํค์ง๋ค์ด ์ค์น๋๋ ์ฅ์์ ๋๋ค. ๊ฐ ํจํค์ง๋ ์์ ์ ํ์ ๋๋ ํ ๋ฆฌ๋ฅผ ๊ฐ์ง๋๋ค. -
/opt/homebrew/Caskroom/
: Cask๋ก ์ค์น๋ GUI ์ ํ๋ฆฌ์ผ์ด์ ๋ค์ด ์์นํฉ๋๋ค. -
/opt/homebrew/etc/
: ์ค์ ํ์ผ๋ค์ด ์ ์ฅ๋๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/include/
: ํค๋ ํ์ผ๋ค์ด ์์นํ๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/lib/
: ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ์ผ๋ค์ด ์์นํ๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/opt/
: ํ์ฌ ์ค์น๋ ํจํค์ง๋ค์ ์ต์ ๋ฒ์ ์ ๋ํ ์ฌ๋ณผ๋ฆญ ๋งํฌ๊ฐ ์์นํฉ๋๋ค. -
/opt/homebrew/sbin/
: ์์คํ ๊ด๋ฆฌ์์ฉ ์คํ ํ์ผ๋ค์ด ์์นํฉ๋๋ค. -
/opt/homebrew/share/
: ๊ณต์ ๋ฆฌ์์ค(๋ฌธ์, ๋งค๋ด์ผ ํ์ด์ง ๋ฑ)๊ฐ ์ ์ฅ๋๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/var/
: ๊ฐ๋ณ ๋ฐ์ดํฐ(๋ก๊ทธ ํ์ผ ๋ฑ)๊ฐ ์ ์ฅ๋๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/Homebrew/
: Homebrew ์ฝ์ด์ Git ์๋ธ๋ชจ๋์ ๋๋ค. Formula๋ค์ ์ ์๋ ์ด ์์ ์์ต๋๋ค. -
/opt/homebrew/Frameworks/
: ์ผ๋ถ ์ ํ๋ฆฌ์ผ์ด์ ์ ํ์ํ ํ๋ ์์ํฌ๋ค์ด ์ค์น๋๋ ๋๋ ํ ๋ฆฌ์ ๋๋ค. -
/opt/homebrew/Library/Homebrew/
: Homebrew์ Ruby ์ฝ๋ ๋๋ถ๋ถ์ด ์ฌ๊ธฐ์ ์์นํฉ๋๋ค. ์ด๋ Homebrew์ ํต์ฌ ๊ธฐ๋ฅ์ ๊ตฌํํ๋ ์ฝ๋์ ๋๋ค. -
/opt/homebrew/Library/Taps/
: ์ฌ๊ธฐ์๋ ํญ(tap)๋ ์ ์ฅ์๋ค์ด ์์นํฉ๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก homebrew/core์ homebrew/cask๊ฐ ํฌํจ๋์ด ์์ผ๋ฉฐ, ์ฌ์ฉ์๊ฐ ์ถ๊ฐํ ๋ค๋ฅธ ํญ๋ค๋ ์ด ๋๋ ํ ๋ฆฌ์ ์์นํ๊ฒ ๋ฉ๋๋ค.
/opt/homebrew
๊ฐ Git ์ ์ฅ์๋ผ๋ ์ ์ Homebrew์ ์์ฒด ์
๋ฐ์ดํธ์ ๋ฒ์ ๊ด๋ฆฌ๋ฅผ ์ฉ์ดํ๊ฒ ํฉ๋๋ค. ์ฌ์ฉ์๋ brew update
๋ช
๋ น์ ํตํด ์ด ์ ์ฅ์๋ฅผ ์ต์ ์ํ๋ก ์ ์งํ ์ ์์ผ๋ฉฐ, ์ด๋ Homebrew ์์คํ
์ ์ฒด์ ์ผ๊ด์ฑ๊ณผ ์ต์ ์ฑ์ ๋ณด์ฅํฉ๋๋ค.
์ด๋ฌํ ๊ตฌ์กฐ๋ Homebrew๊ฐ ํจํค์ง๋ฅผ ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํ๊ณ , ์ฌ์ฉ์ ์์คํ ๊ณผ ๋ ๋ฆฝ์ ์ผ๋ก ์ด์๋ ์ ์๊ฒ ํด์ค๋๋ค. ๊ฐ ๋๋ ํ ๋ฆฌ๋ ํน์ ๋ชฉ์ ์ ๊ฐ์ง๊ณ ์์ด, ํจํค์ง ๊ด๋ฆฌ๋ฅผ ์ฒด๊ณ์ ์ผ๋ก ํ ์ ์๊ฒ ๋์์ค๋๋ค.
glib ํจํค์ง๋ฅผ ๊ธฐ์ค์ผ๋ก ์ด๋ป๊ฒ ๊ตฌ์ฑ๋๋์ง ์ดํด๋ณด๊ฒ ์ต๋๋ค. brew install glib
๋ช
๋ น์ด๋ก ํจํค์ง๋ฅผ ์ค์นํ๊ฒ ๋๋ฉด /opt/homebrew/Cellar
๋๋ ํ ๋ฆฌ ์๋์ {name}/{version}
๋๋ ํ ๋ฆฌ๊ฐ ์์ฑ๋๊ณ ๊ทธ ์๋์ ์ค์ ๋ก ํจํค์ง๊ฐ ํฌํจํ๊ณ ์๋ ํ์ผ๋ค์ด ์ค์น๋ฉ๋๋ค.
/opt/homebrew/Cellar
โโโ glib
โโโ 2.80.3
โโโ bin
โโโ etc
โโโ include
โโโ lib
โโโ share
๊ทธ๋ฆฌ๊ณ ๊ฐ ํ์ผ๋ค์ /opt/homebrew
์ ์ ์ ํ ์์น์ Symbolic link๋ก ์ ๊ณต๋ฉ๋๋ค.
$ ls -l /opt/homebrew/bin/gdbus
/opt/homebrew/bin/gdbus -> ../Cellar/glib/2.80.3/bin/gdbus
$ ls -l /opt/homebrew/lib/libglib-2.0.dylib
/opt/homebrew/lib/libglib-2.0.dylib -> ../Cellar/glib/2.80.3/lib/libglib-2.0.dylib
$ ls -l /opt/homebrew/opt/glib
/opt/homebrew/opt/glib -> ../Cellar/glib/2.80.3
Homebrew ํจํค์ง๋ brew
๋๊ตฌ๋ฅผ ์ด์ฉํด ์ค์น, ์ ๊ฑฐํ ์ ์์ผ๋ฉฐ, ์ค์น๋ ํจํค์ง ๋ชฉ๋ก๋ ํ์ธํ ์ ์์ต๋๋ค.
ํจํค์ง ์ค์น๋ฅผ ์ํ ๊ธฐ๋ณธ์ ์ธ ๋ช ๋ น:
brew install <ํจํค์ง๋ช
>: ํจํค์ง ์ค์น
brew uninstall <ํจํค์ง๋ช
>: ํจํค์ง ์ ๊ฑฐ
brew update: Homebrew ์์ฒด์ ๊ณต์ ํจํค์ง ๋ชฉ๋ก ์
๋ฐ์ดํธ
brew upgrade: ์ค์น๋ ๋ชจ๋ ํจํค์ง ์
๊ทธ๋ ์ด๋
brew list: ์ค์น๋ ํจํค์ง ๋ชฉ๋ก ํ์ธ
brew search <๊ฒ์์ด>: ํจํค์ง ๊ฒ์
brew info <ํจํค์ง๋ช
>: ํจํค์ง ์ ๋ณด ํ์ธ
brew tap <user/repo>: Tap ์ถ๊ฐ
brew untap <tap>: Tap ์ ๊ฑฐ
Formula, Tap ๋ฑ ํจํค์ง ์์ฑ์ ์ํ ๊ฐ๋ฐ์ ๋ช ๋ น:
brew tap-new <user/repo>: Tap ์์ฑ
brew create <URL>: Formula ์์ฑ
brew edit <formula>: Formula ํธ์ง
brew audit <formula>: Formula ๋ฌธ๋ฒ ๊ฒ์ฌ
brew style <formula>: Formula style ๊ฐ์ด๋ ๊ฒ์ฌ
์ ์ฒด ๋ช ๋ น์ ๋ํ ์ค๋ช ์ https://docs.brew.sh/Manpage๋ฅผ ์ฐธ๊ณ ๋ฐ๋๋๋ค. ๊ฐ๋ฐ์๋ฅผ ์ํ ๋ช ๋ น์ https://docs.brew.sh/Manpage#developer-commands๋ฅผ ํตํด ๋ ์ฝ๊ฒ ์ฐพ์๋ณผ ์ ์์ต๋๋ค.
์ด์ ์ค์ ๋ก Homebrew ํจํค์ง๋ฅผ ๋ง๋๋ ๊ณผ์ ์ ์ดํด๋ณด๊ฒ ์ต๋๋ค
Formula ์์ฑ์ ์ํด ๋จผ์ ์๋ ๋ช ๋ น์ ํตํด ๊ธฐ๋ณธ ์์ ๊ณต๊ฐ(homebrew/core ์ ์ฅ์ ์ฌ์ฉ)์ ์ค๋นํฉ๋๋ค.
export HOMEBREW_NO_INSTALL_FROM_API=1
brew tap --force homebrew/core
์ฌ๊ธฐ์ HOMEBREW_NO_INSTALL_FROM_API=1
ํ๊ฒฝ ๋ณ์๋ Homebrew๊ฐ API๋ฅผ ํตํด ํจํค์ง๋ฅผ ์ค์นํ๋ ๊ฒ์ ๋ฐฉ์งํ๊ณ , ๋์ ๋ก์ปฌ Formula ํ์ผ์ ์ฌ์ฉํ๋๋ก ํฉ๋๋ค. brew tap --force homebrew/core
๋ช
๋ น์ Homebrew์ ํต์ฌ Formula ์ ์ฅ์๋ฅผ ๊ฐ์ ๋ก ๋ค์ ํญ(tap)ํ์ฌ ์ต์ ์ํ๋ก ์ ์งํฉ๋๋ค. ์ด ๊ณผ์ ์ ์๋ก์ด Formula๋ฅผ ๊ฐ๋ฐํ๊ณ ํ
์คํธํ๋ ๋ฐ ํ์์ ์ธ ๋จ๊ณ์
๋๋ค.
๋ค์์ผ๋ก ์๋์ ๊ฐ์ด brew create
๋ช
๋ น์ผ๋ก ํจํค์ง์ ์ฌ์ฉํ ALN ์์ค ์์ถํ์ผ์ ์ง์ ํฉ๋๋ค.
$ brew create https://github.com/webispy/aln/archive/refs/tags/v0.1.1.tar.gz
Formula name [aln]:
Formula๋ก ์ฌ์ฉํ ์ด๋ฆ์ ๋ฌผ์ด๋ณด๋ฉด ์ํ๋ ์ด๋ฆ์ ์
๋ ฅํฉ๋๋ค. ์์ ์์ ์์๋ ์๋์ผ๋ก ์ถ์ฒํด์ค aln
์ ๊ทธ๋๋ก ์ฌ์ฉํ์ต๋๋ค.
์ค์ ํ๊ณ ๋๋ฉด ์์ค ํ์ผ์ ๋ค์ด๋ก๋ ๋ฐ๊ณ ์๋์ผ๋ก ๊ธฐ๋ณธ ํ
ํ๋ฆฟ์ ์ฌ์ฉํ์ฌ ๋ง๋ค์ด์ง Formula ํ์ผ์ด ํธ์ง๊ธฐ์ ํจ๊ป ์คํ๋ฉ๋๋ค.
(Formula ํ์ผ์ /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/aln.rb
์ ์์ฑ๋ฉ๋๋ค.)
# Documentation: https://docs.brew.sh/Formula-Cookbook
# https://rubydoc.brew.sh/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Aln < Formula
desc "Amazing Lucky Numbers"
homepage "https://webispy.github.io/aln/"
url "https://github.com/webispy/aln/archive/refs/tags/v0.1.1.tar.gz"
sha256 "e1ca51e3153b0b7824b36417c0acd5f4057028992ef1af0cde753408cd21a276"
license "Apache-2.0"
# depends_on "cmake" => :build
def install
# Remove unrecognized options if they cause configure to fail
# https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
system "./configure", "--disable-silent-rules", *std_configure_args
# system "cmake", "-S", ".", "-B", "build", *std_cmake_args
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test aln`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end
์ ์ฅํ๊ณ ํธ์ง๊ธฐ๋ฅผ ๋น ์ ธ๋์จ ๋ค, ์๋์ ๊ฐ์ด edit ๋ช ๋ น์ ์ ๋ ฅํ๋ฉด ์ธ์ ๋ ์ง ๋ค์ ํ์ผ ๋ด์ฉ์ ์์ ํ ์ ์์ต๋๋ค.
brew edit aln
์ด์ ํธ์ง์ฐฝ์์ ALN ๋น๋์ ๋ง๊ฒ ์์ ํด์ ๋ด์ฉ์ ์ฑ์๋ฃ์ต๋๋ค. homebrew-core
์ ์ฅ์(https://github.com/Homebrew/homebrew-core/tree/master/Formula)๋ฅผ ์ฐธ๊ณ ํ๋ฉด ๋ค์ํ Formula ์์ ๋ค์ ์ฐธ๊ณ ํ ์ ์์ต๋๋ค.
ALN์ CMake ๊ธฐ๋ฐ์ ๋น๋ ์์คํ
์ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ด์ ๋ํ ์์กด์ฑ ๋ฐ ๋น๋ ๋ช
๋ น๋ค์ ์์ฑํฉ๋๋ค. ์ฐธ๊ณ ๋ก, Homebrew์์ CMake ๋น๋ ์์คํ
์ ์ง์ํ๊ธฐ ๋๋ฌธ์ CMake ์ต์
์ผ๋ก *std_cmake_args
์ ์ฌ์ฉํ๋ฉด ๊ธฐ๋ณธ์ ์ธ ๊ฐ๋ค์ด ์๋์ผ๋ก ์ฑ์์ง๋๋ค.
class Aln < Formula
desc "Amazing Lucky Numbers Library"
homepage "https://github.com/webispy/aln"
url "https://github.com/webispy/aln/archive/refs/tags/v0.1.0.tar.gz"
sha256 "8db44f88840ae7c93eb237e5aec9f8aa49c5c03bf29e3360f5eabed2f7729902"
license "Apache-2.0"
head "https://github.com/webispy/aln.git", branch: "master"
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "glib"
def install
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
system "#{bin}/aln"
end
end
์์ค ์์ถ ํ์ผ์ ๋ํ sha256 ์ฒดํฌ์ฌ์ ๊ฒฝ์ฐ coreutils
ํจํค์ง ์ค์น ํ ์๋์ ๊ฐ์ด sha256sum
๋ช
๋ น์ผ๋ก ๊ฐ์ ์ป์ ์ ์์ต๋๋ค.
$ brew install coreutils
$ sha256sum v0.1.0.tar.gz
8db44f88840ae7c93eb237e5aec9f8aa49c5c03bf29e3360f5eabed2f7729902 v0.1.0.tar.gz
์์ฑํ Formula ํ์ผ์ ๋ํด ๋ฌธ๋ฒ์ ๋ฌธ์ ๊ฐ ์๋์ง ์๋ ๋ช ๋ น์ผ๋ก ๊ฒ์ฌํ ์ ์์ต๋๋ค.
$ brew audit -new aln
* GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
Error: 1 problem in 1 formula detected.
ALN ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ ๋ช
ํ์ง ์๊ธฐ ๋๋ฌธ์ ๋ฌธ์ ๊ฐ ์๋ค๋ ์๋ฌ๊ฐ ๋ฐ์ํ์ต๋๋ค. ํจํค์ง๋ฅผ ๋ฉ์ธ ์ ์ฅ์์ธ homebrew-core
์ ์ฌ๋ฆฌ์ง ์๊ณ ๋ณ๋ Tap์ ํตํด ๋ฐฐํฌํ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ ์ ์๋ฌ๋ ๋ฌด์ํด๋ ๋ฉ๋๋ค.
์์ฑํ Formula ํ์ผ์ ์คํ์ผ๋ ๊ฒ์ฌํ ์ ์์ต๋๋ค.
$ brew style aln
1 file inspected, no offenses detected
์ด์ ์์ฑํ Formula๋ฅผ ์ด์ฉํด์ ์ ์์ ์ผ๋ก ํจํค์ง ๋น๋ ๋ฐ ์ค์น๊ฐ ๋๋์ง ํ์ธํฉ๋๋ค. aln์ ์์ง Bottle๋ก ๋ฐฐํฌ๋์ ์ด ์๊ธฐ ๋๋ฌธ์ ๋ฏธ๋ฆฌ ์ปดํ์ผ๋ ๋ฐ์ด๋๋ฆฌ ํจํค์ง๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค. ๋ฐ๋ผ์ ์ง์ ๋น๋ํด์ ์ค์นํ๋๋ก --build-from-source
์ต์
์ ์ถ๊ฐํด์ผ ํฉ๋๋ค.
$ brew install --build-from-source aln
==> Fetching dependencies for aln: cmake and glib
==> Fetching cmake
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/manifests/3.30.0
############################################################################################################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:4eb265cf09f23ebab2f4b5cc463150a8cd1004b480e43496593bebec24eb49f6
############################################################################################################################################################################################################# 100.0%
==> Fetching glib
==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.80.4
############################################################################################################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/glib/blobs/sha256:e52c5b1cfc4a9c37fbd697a29d37c96d778d0699d2051d167ca3fd76010c25e2
############################################################################################################################################################################################################# 100.0%
==> Fetching aln
==> Downloading https://github.com/webispy/aln/archive/refs/tags/v0.1.0.tar.gz
==> Downloading from https://codeload.github.com/webispy/aln/tar.gz/refs/tags/v0.1.0
##O=- # #
==> Installing dependencies for aln: cmake and glib
==> Installing aln dependency: cmake
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/manifests/3.30.0
Already downloaded: /Users/work/Library/Caches/Homebrew/downloads/dce5c120f5a36a420d00e9c5a8262781cc00bb40d11f512da96d7bfd3a5e38cb--cmake-3.30.0.bottle_manifest.json
==> Pouring cmake--3.30.0.arm64_sonoma.bottle.tar.gz
๐บ /opt/homebrew/Cellar/cmake/3.30.0: 3,424 files, 55.3MB
==> Installing aln dependency: glib
==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.80.4
Already downloaded: /Users/work/Library/Caches/Homebrew/downloads/f635cb07f35354f1ef636173e4d8f0e85a3bd09d85784c8639a201b1c5263742--glib-2.80.4.bottle_manifest.json
==> Pouring glib--2.80.4.arm64_sonoma.bottle.tar.gz
๐บ /opt/homebrew/Cellar/glib/2.80.4: 526 files, 36.2MB
aln.rb
Formula์์ ์์กด์ฑ ํจํค์ง๋ก ์ ์ํ cmake
์ glib
ํจํค์ง๊ฐ ์๋์ผ๋ก ์ค์น๋ ํ aln์ ๋ํด ๋น๋ ๋ฐ ์ค์น๊ฐ ์งํ๋ฉ๋๋ค.
==> Installing aln
==> cmake -S . -B build -DCMAKE_INSTALL_RPATH=@loader_path/../lib
==> cmake --build build
==> cmake --install build
๐บ /opt/homebrew/Cellar/aln/0.1.0: 12 files, 132.9KB, built in 22 seconds
==> Running `brew cleanup aln`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/work/Library/Caches/Homebrew/aln--0.1.1.tar.gz... (50.9KB)
==> Upgrading 2 dependents of upgraded formulae:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
harfbuzz 8.5.0 -> 9.0.0, libass 0.17.2 -> 0.17.3
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/9.0.0
############################################################################################################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libass/manifests/0.17.3
Already downloaded: /Users/work/Library/Caches/Homebrew/downloads/84606583aa38b5ab3bcd159983c1468927012bf37cf5d21cc8e3a9eb334b252d--libass-0.17.3.bottle_manifest.json
==> Checking for dependents of upgraded formulae...
==> No broken dependents found!
๋น๋ ๋ฐ ์ค์น๊ฐ ๋ฌธ์ ์์ด ์๋ฃ๋์์ต๋๋ค. ํ
์คํธ๊ฐ ๋๋ฌ์ผ๋ brew uninstall aln
๋ก ์ค์น๋ ํจํค์ง ์ ๊ฑฐํฉ๋๋ค.
์ด์ฒ๋ผ Formula ์์ฑ์ ํตํด ๊ธฐ๋ณธ์ ์ธ Homebrew ํจํค์ง ๋ฐฉ๋ฒ์ ๋ํด ์์๋ณด์์ผ๋ฉฐ, ๊ธฐ๋ณธ ๊ตฌ์กฐ์ ์๋ ๋ฐฉ์์ ์ดํดํ ์ ์์์ต๋๋ค. ๋ณด๋ค ์์ธํ ๋ด์ฉ์ https://docs.brew.sh/Formula-Cookbook ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค.
์ค์ ๋ฐฐํฌ๋ฅผ ์ํด์๋ ๋ช ๊ฐ์ง ์ถ๊ฐ ๋จ๊ณ๊ฐ ํ์ํฉ๋๋ค. ์ด์ด์ง๋ ๋ด์ฉ์์๋ Tap์ ํตํด Formula๋ฅผ ๋ฐฐํฌํ๋ ๋ฐฉ๋ฒ์ ์ดํด๋ณด๊ฒ ์ต๋๋ค. ๋ํ, Github Actions๋ฅผ ์ฌ์ฉํ์ฌ bottle์ ์๋์ผ๋ก ๋ฆด๋ฆฌ์ฆํ๋ ๊ณผ์ ๋ ์์ธํ ์ค๋ช ํ๊ฒ ์ต๋๋ค.
Homebrew๋ ๊ธฐ๋ณธ์ ์ผ๋ก Github repository๋ฅผ ํตํด Formula๋ฅผ ๊ด๋ฆฌํ๊ณ ์์ผ๋ฉฐ, ์ปดํ์ผ๋ ํจํค์ง๋ Github packages๋ฅผ ํตํด ๋ฐฐํฌํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ https://github.com/orgs/Homebrew/packages์์ ํ์ธํ ์ ์์ต๋๋ค.
์์์ brew install
๋ก ALN ํจํค์ง๋ฅผ ์ค์นํ ๋ ์์กด์ฑ ํจํค์ง๋ก ์ค์น๋ cmake
๋ฅผ ์๋ก ๋ค๋ฉด, ํด๋น ํจํค์ง๋ homebrew-core
์์ ์ ๊ณต๋๊ธฐ ๋๋ฌธ์ core/cmake
๋ผ๋ ์ด๋ฆ์ผ๋ก ๋ฐฐํฌ๋์ด ์์ต๋๋ค. ๋ฐ๋ผ์, https://github.com/Homebrew/homebrew-core/pkgs/container/core%2Fcmake์์ ๋ฐฐํฌ๋ ๋ชจ๋ ๋ฒ์ ์ ํ์ธํด ๋ณผ ์ ์์ต๋๋ค. ์ธ๋ถ ๋ด์ฉ์ ๋ฒ์ ์ ํ ํ OS/Arch
ํญ์์ ํ์ธ ๊ฐ๋ฅํฉ๋๋ค
๋ํ, Tap์ ์ํด Github release์ ์ฐ๊ณํ์ฌ ๊ฐ ํจํค์ง๋ณ๋ก ์ปดํ์ผ๋ ๋น๋ ๊ฒฐ๊ณผ๋ฌผ์ธ bottle์ ๋ฐฐํฌ ๋ฐ ๋ค์ด๋ก๋ํ ์ ์๋๋ก ๋ชจ๋ Github Actions ์คํฌ๋ฆฝํธ๋ฅผ ์์ฒด์ ์ผ๋ก ์ ๊ณตํ๊ณ ์์ต๋๋ค.
brew tap-new <user/repo>
๋ช
๋ น์ด ํ๋๋ก ๋ฐฐํฌ์ ๊ด๋ จ๋ Github Actions ์คํฌ๋ฆฝํธ์ ๊ธฐ๋ณธ Git ์ ์ฅ์๋ฅผ ํ ๋ฒ์ ์์ฑํ ์ ์์ต๋๋ค.
repo
์ด๋ฆ์ aln
์ ์
๋ ฅํ๋ฉด ์๋์ผ๋ก ์ด๋ฆ ๊ท์น์ ๋ฐ๋ผ ์์ homebrew-
์ ๋์ฌ๊ฐ ์ถ๊ฐ๋ฉ๋๋ค. ๋ฐ๋ผ์ ์ค์ Github ์ ์ฅ์ ์ด๋ฆ์ webispy/homebrew-aln
์ด์ง๋ง, Tap์ผ๋ก ์ฌ์ฉํ ๋๋ webispy/aln
์ด๋ผ๋ ์ด๋ฆ์ ์ฌ์ฉํฉ๋๋ค.
$ brew tap-new webispy/aln
Initialized empty Git repository in /opt/homebrew/Library/Taps/webispy/homebrew-aln/.git/
[main (root-commit) 6ccefd4] Create webispy/aln tap
3 files changed, 97 insertions(+)
create mode 100644 .github/workflows/publish.yml
create mode 100644 .github/workflows/tests.yml
create mode 100644 README.md
==> Created webispy/aln
/opt/homebrew/Library/Taps/webispy/homebrew-aln
When a pull request making changes to a formula (or formulae) becomes green
(all checks passed), then you can publish the built bottles.
To do so, label your PR as `pr-pull` and the workflow will be triggered.
๋ช
๋ น์ด ์ฑ๊ณตํ๋ฉด, /opt/homebrew/Library/Taps/webispy/homebrew-aln
๋๋ ํ ๋ฆฌ์ Git ์ ์ฅ์๊ฐ ์ค๋น๋ฉ๋๋ค.
์ด์ Github ํํ์ด์ง์์ homebrew-aln
์ด๋ผ๋ ๋น์ด ์๋ ์ ์ฅ์๋ฅผ ์์ฑํ ๋ค, ์์์ ์์ฑ๋ ํ์ผ๋ค์ ์
๋ก๋ ํ๋ฉด ๋ฉ๋๋ค. (์ฐธ๊ณ ๋ก, ๊ฐ์ธ์ ์ผ๋ก homebrew-aln
์ ์ฅ์๋ฅผ ์ด๋ฏธ ๊ฐ์ง๊ณ ์๊ธฐ ๋๋ฌธ์ ํ
์คํธ๋ฅผ ์ํด homebrew-haha
๋ก ํ๋ฉด์ ์บก์ณํ์์ต๋๋ค.)
์ ์ฅ์์ ์ ๋ก๋ํ ํ์ผ์ด ์ด๋ฏธ ์ค๋น๋์ด ์๊ธฐ ๋๋ฌธ์ ๋ค๋ฅธ ์ต์ ์ ํ ์์ด ๋ฐ๋ก Create repository ์ ํํฉ๋๋ค.
์ ์ฅ์ ์์ฑ์ด ์๋ฃ๋๋ฉด ์๋์ ๊ฐ์ด ๊ธฐ๋ณธ ์๋ด ํ๋ฉด์ด ๋ํ๋ฉ๋๋ค.
์ด์ ์ ์ฅ์์ ํ์ผ์ ์
๋ก๋ ํฉ๋๋ค. tap-new
๋ช
๋ น ๋จ๊ณ์์ ์ปค๋ฐ์ด ์๋์ผ๋ก ๋ง๋ค์ด์ง๊ธฐ ๋๋ฌธ์, remote๋ฅผ ์ถ๊ฐํ ํ ๋ฐ๋ก push ๋ช
๋ น์ ์ํํ๋ฉด ๋ฉ๋๋ค.
cd /opt/homebrew/Library/Taps/webispy/homebrew-aln
git remote add origin [email protected]:webispy/homebrew-aln.git
git push -u origin main
์ ๋ก๋ ํ Github ์ ์ฅ์๋ฅผ ํ์ธํด ๋ณด๋ฉด ํ์ผ๋ค์ด ์ ์์ ์ผ๋ก ์ ๋ก๋๋ ๊ฒ์ ๋ณผ ์ ์์ต๋๋ค. ๋ํ, ๋น๋๊ฐ ๋์ ์ค์์ ์๋ ค์ฃผ๋ ์์ด์ฝ์ด ํ์๋๋ ๊ฒ์ ํ์ธํ ์ ์๋๋ฐ, Actions ๋ฉ๋ด์์ ์งํ์ค์ธ ๋น๋๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.
์ด์ Actions๋ฅผ ์ ํํด ํ์ธํด ๋ณด๊ฒ ์ต๋๋ค. brew tap-new
๋ฅผ ํตํด ์๋ ์์ฑ๋ Github Actions์ workflow ํญ๋ชฉ๋ค์ ์ผ์ชฝ์์ ํ์ธํ ์ ์์ผ๋ฉฐ, ํ์ฌ ์งํ ์ค์ธ workflow ๋น๋ ์ํ๋ ํ์ธํ ์ ์์ต๋๋ค.
์งํ ์ค์ธ workflow๋ฅผ ์ ํํด ์ธ๋ถ ๋ด์ฉ์ ํ์ธํด๋ณด๋ฉด, Jobs ํญ๋ชฉ์ 3๊ฐ์ ์์ดํ ์ด ์๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
Github Actions์์๋ ๋ค์ํ ๋น๋ ์คํ ํ๊ฒฝ(Runner)๋ฅผ ์ ๊ณตํ๋๋ฐ, brew tap-new
๋ช
๋ น์ ํตํด ์์ฑ๋ ์คํฌ๋ฆฝํธ์ ๋ฐ๋ผ Ubuntu 22.04, macOS 13, macOS 14์์ ๋น๋๊ฐ ์๋ฃ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
์ฐธ๊ณ ๋ก Github Runner์์ ์ ๊ณตํ๋ macOS 13 (Ventura) runner๋ Intel Mac์์, macOS 14 (Sonoma) runner๋ Apple Silicon Mac์์ ์คํ๋ฉ๋๋ค. ๋ฐ๋ผ์, Formula๋ฅผ ์์ฑํด์ ์ ๋ก๋ํ๋ฉด ๋๊ฐ์ง Architecture๋ฅผ ์ง์ํ๋ ์ปดํ์ผ๋ ํจํค์ง(bottle)๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
์ด์ ๊ธฐ๋ณธ์ ์ธ ์ค๋น ๊ณผ์ ์ ๋ชจ๋ ๋๋ฌ์ต๋๋ค. ๋ค์ ๋จ๊ณ์์ ์์ฑํ Formula๋ฅผ ์ ๋ก๋ํด๋ณด๊ฒ ์ต๋๋ค.
brew tap-new
๋ฅผ ํตํด ์๋ ์์ฑ๋ Github Actions workflow์๋ Pull request๋ฅผ ํตํด Formula ํ์ผ์ ๊ฒํ ๋ฐ ๋น๋ํ๊ณ , main ๋ธ๋์น๋ก ๋ณํฉํ๋ ๊ธฐ๋ฅ์ด ํฌํจ๋์ด ์์ต๋๋ค.
์ด์ ๋จ๊ณ์์ brew create
๋ก ์์ฑํ๊ณ brew edit
๋ก ์์ ํ aln.rb
Formula ํ์ผ์ ๋ฐฐํฌํ๊ธฐ ์ํด Pull request๋ฅผ ๋ง๋ค์ด ์
๋ก๋ํด ๋ณด๊ฒ ์ต๋๋ค.
๋จผ์ Pull request๋ฅผ ๋ง๋ค๊ธฐ ์ํด ๋ธ๋์น๋ฅผ ์์ฑํฉ๋๋ค.
cd /opt/homebrew/Library/Taps/webispy/homebrew-aln
git checkout -b add_aln
์์ฑํ๋ aln.rb
Formula ํ์ผ์ ํ์ฌ ์ ์ฅ์ ๋๋ ํ ๋ฆฌ์ Formula/
ํ์ ๋๋ ํ ๋ฆฌ๋ก ์ด๋์ํต๋๋ค.
mv /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/aln.rb Formula
์ปค๋ฐ์ ์์ฑํ ํ ๋ธ๋์น์ push ํฉ๋๋ค.
git add Formula/aln.rb
git commit -m "Formula: add aln"
git push origin add_aln
Github ์ ์ฅ์ ํํ์ด์ง์์ ๋ธ๋์น์ ์ปค๋ฐ์ด ์ถ๊ฐ๋์์์ ์๋ฆฌ๋ ์๋ฆผ์ ํ์ธํ ์ ์์ต๋๋ค. Compare & pull request ๋ฅผ ์ ํํฉ๋๋ค.
Pull request ์์ฑ ํ๋ฉด์ ๋๋ค. ํ์์ ์ค๋ช ์ ์ถ๊ฐํ ์ ์๋๋ฐ, ์ผ๋จ Create pull request๋ฅผ ์ ํํด ๋ฐ๋ก PR(Pull Request)์ ์์ฑํฉ๋๋ค.
PR์ด ์์ฑ๋๋ฉด Github Actions workflow์ ์ํด ๋น๋๊ฐ ์๋์ผ๋ก ์ํ๋ฉ๋๋ค. ์๋ ํ๋ฉด์ ํ์๋ ๊ฒ๊ณผ ๊ฐ์ด 3๊ฐ์ ๋น๋๊ฐ ์งํ์ค์์ ํ์ธํ ์ ์์ต๋๋ค.
๋น๋๊ฐ ๋ชจ๋ ์ฑ๊ณต์ ์ผ๋ก ๋๋๋ฉด All checks have passed๋ผ๊ณ ํ์๋ฉ๋๋ค. ์ด์ ์ด PR์ main ๋ธ๋์น๋ก ๋ณํฉํ๋ฉด ๋๋๋ฐ, brew tap-new
๋ฅผ ํตํด ์์ฑ๋ Github Actions workflow์๋ ์ด ๋ณํฉ ๊ณผ์ ์ ๋ํ ์๋ํ ์คํฌ๋ฆฝํธ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
๋ฐ๋ผ์, ์ง์ Merge pull request๋ฅผ ์ ํํ์ง ๋ง๊ณ Labels๋ฅผ ํตํด ์๋ํ ์คํฌ๋ฆฝํธ๋ฅผ ํธ๋ฆฌ๊ฑฐ ์์ผ์ผ ํฉ๋๋ค.
Github Actions workflows ์ค .github/workflows/publish.yml
ํ์ผ์ ์ ์๋ ๋ด์ฉ์ ํ์ธํด ๋ณด๋ฉด, ์๋์ ๊ฐ์ด pr-pull
์ด๋ผ๋ ๋ผ๋ฒจ์ด ์ค์ ๋๋ฉด ๋์ํ๋๋ก ์์ฑ๋์ด ์์ต๋๋ค.
name: brew pr-pull
on:
pull_request_target:
types:
- labeled
jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
...
๋ฐ๋ผ์, pr-pull
๋ผ๋ฒจ์ ์ ํํ๋ฉด ๋๋๋ฐ, ๊ธฐ๋ณธ์ ์ผ๋ก Github ์ ์ฅ์ ์์ฑ์ ์๋์ผ๋ก ์ ๊ณต๋๋ Labels ๋ชฉ๋ก์ ํฌํจ๋์ด ์์ง ์๊ธฐ ๋๋ฌธ์ ์ง์ ์ถ๊ฐํด์ผ ํฉ๋๋ค.
Label ์ถ๊ฐ๋ฅผ ์ํด Issues ๋ฉ๋ด์์ Labels๋ฅผ ์ ํํฉ๋๋ค.
ํ์ฌ ์ฌ์ฉ ๊ฐ๋ฅํ Label ๋ชฉ๋ก์ด ๋ํ๋๋๋ฐ, New label์ ์ ํํฉ๋๋ค.
Label ์์ฑ ํ๋ฉด์์ ์ด๋ฆ์ pr-pull
์ ์
๋ ฅํ ๋ค Create label์ ์ ํํฉ๋๋ค. Label ์์์ ๊ธฐ๋ณธ๊ฐ์ ์ฌ์ฉํด๋ ๋๊ณ ๋๋ค์ผ๋ก ์ ํํ๊ฑฐ๋, ์ง์ ์์ ์ฝ๋๋ฅผ ์
๋ ฅํด๋ ๋ฉ๋๋ค.
์ด์ ์๋์ ๊ฐ์ด Label ๋ชฉ๋ก์ pr-pull
์ด ์ถ๊ฐ๋์์ต๋๋ค.
๋ค์ Pull requests ํ๋ฉด์ผ๋ก ๋์๊ฐ์ Labels ํญ๋ชฉ์ ์๋ ํฑ๋๋ฐํด ์์ด์ฝ์ ์ ํํ ๋ค, ์์์ ์์ฑํ pr-pull
๋ผ๋ฒจ์ ์ ํํฉ๋๋ค.
๋ผ๋ฒจ์ด ์ ํ๋๋ฉด, ์์ Workflow์ ์ ์๋ ํธ๋ฆฌ๊ฑฐ์ ์ํด ๋น๋๊ฐ ์ถ๊ฐ์ ์ผ๋ก ์ํ๋ฉ๋๋ค.
๋น๋๊ฐ ์ฑ๊ณต์ ์ผ๋ก ๋๋๋ฉด, Pull request๊ฐ ์๋์ผ๋ก Closed ์ฒ๋ฆฌ๋๊ณ , main ๋ธ๋์น์ ๋ฐ์๋๋๋ฐ, Formula ํ์ผ์ bottle
๋ถ๋ถ์ด ์๋์ ๊ฐ์ด ์๋์ผ๋ก ์ฑ์์ง ์ํ๋ก ์ถ๊ฐ๋ฉ๋๋ค.
...
bottle do
root_url "https://github.com/webispy/homebrew-haha/releases/download/aln-0.1.0"
sha256 cellar: :any, arm64_sonoma: "1521a642335a82a6e039109f22730476d7180e92a1fe6ffb04348e01a42503d9"
sha256 cellar: :any, ventura: "8143c23b5fb4650b31dc6ca90eaaa6c3ea15615ff405fed4a1c588bc3e6ecba9"
sha256 cellar: :any_skip_relocation, x86_64_linux: "1eb42a074a8698120b27d65d460dc2e1feb7a959a0edb3c20dd3190eeddb0221"
end
...
Bottle์ด ์ ์์ ์ผ๋ก ์ ๋ฐฐํฌ๋์๋์ง ํ์ธํด ๋ณด๊ฒ ์ต๋๋ค. ๋ฐฐํฌ๋ Github Releases๋ฅผ ํตํด ์งํ๋๋๋ฐ, Github ์ ์ฅ์ ๊ธฐ๋ณธ ํ๋ฉด์ ๋ณด๋ฉด ์ค๋ฅธ์ชฝ Releases์ aln-0.1.0
์ด ์ถ๊ฐ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
์์ธ ๋ด์ฉ์ ํ์ธํด๋ณด๊ธฐ ์ํด Releases๋ฅผ ์ ํํฉ๋๋ค.
์๋์ ๊ฐ์ด ์ ์์ ์ผ๋ก 3๊ฐ์ Bottle์ด ์์ฑ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
- aln-0.1.0.arm64_sonoma.bottle.tar.gz (macOS 14 - Apple Silicon Mac)
- aln-0.1.0.ventura.bottle.tar.gz (macOS 13 - Intel Mac)
- aln-0.1.0.x86_64_linux.bottle.tar.gz (Linux - x86_64)
์ง๊ธ๊น์ง Tap์ ํตํด Formula๋ฅผ ๋ฐฐํฌํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ณด์์ต๋๋ค. ๋ค์ ๋จ๊ณ์์๋ ๋ฐฐํฌํ Formula๊ฐ ์ ์์ ์ผ๋ก ์ค์น๋๋์ง ํ์ธํด ๋ณด๊ฒ ์ต๋๋ค.
์ด์ ๋จ๊ณ์์ Github Releases๋ฅผ ํตํด ๋ฐฐํฌํ Formula๊ฐ Homebrew๋ฅผ ํตํด ์ ์์ ์ผ๋ก ์ค์น๋๋์ง ํ์ธํด ๋ณด๊ฒ ์ต๋๋ค.
๋จผ์ ์์ ํ๋ tap์ ์ ๊ฑฐํ๊ณ ์์ํ๊ฒ ์ต๋๋ค:
$ brew untap webispy/aln
Untapping webispy/aln...
Untapped 1 formula (15 files, 11.5KB).
Tap์์ ๋ฐฐํฌํ๋ Formula ์ค์น์, Tap์ ๋จผ์ ์ถ๊ฐํ๊ณ Formula๋ฅผ ์ค์นํ๊ฑฐ๋ Formula ์ด๋ฆ์ Tap์ ํฌํจ์์ผ์ ํ๋ฒ์ ์ค์นํ ์ ์์ต๋๋ค.
Tap์ ๋จผ์ ์ถ๊ฐํ๊ณ Formula ์ค์น:
$ brew tap webispy/aln
Tapped 1 formula (15 files, 11.5KB).
$ brew install aln
==> Fetching webispy/aln/aln
==> Downloading https://github.com/webispy/homebrew-aln/releases/download/aln-0.1.0/aln-0.1.0.arm64_sonoma.bottle.tar.gz
Already downloaded: /Users/work/Library/Caches/Homebrew/downloads/5bcd7a6e2afabcaa8cab7b038840b65fe9c56b3f607fd87a841cf195a255fbed--aln-0.1.0.arm64_sonoma.bottle.tar.gz
==> Installing aln from webispy/aln
==> Pouring aln-0.1.0.arm64_sonoma.bottle.tar.gz
๐บ /opt/homebrew/Cellar/aln/0.1.0: 12 files, 151.5KB
==> Running `brew cleanup aln`...
Formula ์ด๋ฆ์ Tap์ ํฌํจ์์ผ์ ํ๋ฒ์ ์ค์น:
$ brew install webispy/aln/aln
Tapped 1 formula (15 files, 11.5KB).
==> Fetching webispy/aln/aln
==> Downloading https://github.com/webispy/homebrew-aln/releases/download/aln-0.1.0/aln-0.1.0.arm64_sonoma.bottle.tar.gz
Already downloaded: /Users/work/Library/Caches/Homebrew/downloads/5bcd7a6e2afabcaa8cab7b038840b65fe9c56b3f607fd87a841cf195a255fbed--aln-0.1.0.arm64_sonoma.bottle.tar.gz
==> Installing aln from webispy/aln
==> Pouring aln-0.1.0.arm64_sonoma.bottle.tar.gz
๐บ /opt/homebrew/Cellar/aln/0.1.0: 12 files, 151.5KB
==> Running `brew cleanup aln`...
์ด๋ ๊ฒ ํด์ macOS์์ Homebrew Formula๋ฅผ ์์ฑํ๊ณ TAP์ ํตํด bottle ํจํค์ง๋ฅผ ๋ฐฐํฌํ๋ ๊ณผ์ ์ ์ดํด๋ณด์์ต๋๋ค. Homebrew์ ๋ค์ํ ๊ธฐ๋ฅ๊ณผ TAP์ ํ์ฉํ๋ฉด, ์์ ๋ง์ ํจํค์ง๋ฅผ ์์ฝ๊ฒ ๋ฐฐํฌํ๊ณ ๊ด๋ฆฌํ ์ ์์ต๋๋ค. ์ด๋ฒ ๊ธ์ด ์ฌ๋ฌ๋ถ์ Homebrew ํ์ฉ์ ๋์์ด ๋๊ธธ ๋ฐ๋๋๋ค.