brew/docs/Rename-A-Formula.md

20 lines
809 B
Markdown
Raw Normal View History

---
last_review_date: "1970-01-01"
---
2015-08-09 15:14:54 +03:00
# Renaming a Formula
2022-04-19 21:28:17 -04:00
Sometimes software and formulae need to be renamed. To rename a formula you need to:
2015-08-09 15:14:54 +03:00
1. Rename the formula file and its class to a new formula name. The new name must meet all the usual rules of formula naming. Fix any test failures that may occur due to the stricter requirements for new formulae compared to existing formulae (e.g. `brew audit --strict` must pass for that formula).
2015-08-09 15:14:54 +03:00
2. Create a pull request on the corresponding tap deleting the old formula file, adding the new formula file, and adding it to `formula_renames.json` with a commit message like `newack: renamed from ack`. Use the canonical name (e.g. `ack` instead of `user/repo/ack`).
2015-08-09 15:14:54 +03:00
A `formula_renames.json` example for a formula rename:
2015-08-09 15:14:54 +03:00
```json
{
"ack": "newack"
}
```