homebrew updater

27
Homebrew U pdater Automatically check release of homebrew formulas.

Upload: chang-yu-sheng

Post on 21-Mar-2017

21 views

Category:

Technology


0 download

TRANSCRIPT

Homebrew UpdaterAutomatically check release of homebrew formulas.

Outline

動機

挑戰

現況

展望

動機

HomebrewThe missing package manager for macOS

-Laruence 2015 PHPConf

「在開源的世界每個⼈都想要新東西,但沒有⼈想去做」

https://github.com/Homebrew/homebrew-php/pulls?q=is%3Apr%20author%3ABePsvPT

挑戰

GitHub Tag 排序

GitHub Tag 排序

https://github.com/philcook/brew-php-switcher

GitHub Tag 排序

GitHub Tag 排序

Tags Api

https://developer.github.com/v3/repos/#list-tags

Commit Api

https://developer.github.com/v3/repos/commits/#get-a-single-commit

GitHub Tag 排序

Fetch all tags

Compare with DB

Fetch non-existing commits

Store commits to DB

Sort all commits

Get newest tag

不⼀致的發布⽅式

不⼀致的發布⽅式

tar.gz

phar (PHP Archive)

Github

Official Website

不⼀致的發布⽅式

抽象化 Abstract

latest archive

不⼀致的發布⽅式

Checker

GitHub

Bitbucket

… … …

latestarchive

不⼀致的發布⽅式

現況

現況Check Releases

Git Commit and Push ( Stable )

Github Pull Request ( Stable )

Notification

現況

https://github.com/Homebrew/homebrew-php/pull/3897

展望

展望網⾴介⾯

⾃動更新

⽀援更多 Formulas

Q & A

Image Source

https://cldup.com/1gFdoLk6Rg.png

https://pbs.twimg.com/media/Csy9dySWgAAAo5B.png

http://imgsrc.baidu.com/baike/pic/item/f31fbe096b63f624dc918b358e44ebf81a4ca33c.jpg

https://i.ytimg.com/vi/3UVFDFYRrPE/maxresdefault.jpg

Thanks