惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
博客园_首页
J
Java Code Geeks
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
量子位
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
B
Blog
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker
How to add a new formula to homebrew package manager
Ashish Bhatia · 2023-12-17 · via ashishb.net

I recently added adb-enhanced to the Homebrew package manager. Here are some of my learnings and future tips to smoothen up the process.

The best way to create and test Formula is to first install Homebrew and then follow the following steps for faster merge

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Change "adb-enhanced" with your preferred formula name everywhere
# Create a new formula via
$ brew create --set-name adb-enhanced
# In the editor, fill in the details, regarding the formula
# You can see mine as a reference at
# https://github.com/Homebrew/homebrew-core/blob/e8e49e89e84a6412ffadce73b24579af986b2e10/Formula/adb-enhanced.rb
# Depending on whether your formula is based on Go, Python, Rust, Java,
# there are different ways to build the code.
# Homebrew won't accept a formula being distributed as a binary

# Verify that formula can be installed
$ brew install --build-from-source adb-enhanced
# Some bare minimal tests are also required
$ brew test adb-enhanced
# This auditing ensures that the formula is acceptable to homebrew
$ brew audit --new adb-enhanced && brew audit --strict adb-enhanced
# These reflects another set of slightly different test that homebrew CI would run
$ brew install --verbose --build-bottle adb-enhanced
$ brew install --include-test adb-enhanced
$ brew link adb-enhanced
$ brew test --verbose adb-enhanced

Once you are done, clone the homebrew repo and add your formula to it. Now, send a pull request to merge it.