Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Drop custom homebrew tap" #380

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "McFly replaces your default ctrl-r shell history search with an i
license = "MIT"
repository = "https://github.com/cantino/mcfly"
categories = ["command-line-utilities"]
exclude = ["docs/*"]
exclude = ["HomebrewFormula", "HomebrewFormula/*", "pkg/*", "docs/*"]

[profile.release]
lto = true
Expand Down
1 change: 1 addition & 0 deletions HomebrewFormula
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ When suggesting a command, McFly takes into consideration:

### Install with Homebrew (on OS X or Linux)

1. Install the tap:
```bash
brew tap cantino/mcfly
```
1. Install `mcfly`:
```bash
brew install mcfly
brew install cantino/mcfly/mcfly
```
1. Add the following to the end of your `~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish` file:

Expand All @@ -71,6 +75,10 @@ When suggesting a command, McFly takes into consideration:
```bash
brew uninstall mcfly
```
1. Remove the tap:
```bash
brew untap cantino/mcfly
```
1. Remove the lines you added to `~/.bashrc` / `~/.zshrc` / `~/.config/fish/config.fish`.

### Install with MacPorts (on OS X)
Expand Down Expand Up @@ -427,5 +435,10 @@ Contributions and bug fixes are encouraged! However, we may not merge PRs that i
1. `git push origin head --tags`
1. Let the build finish.
1. Edit the new Release on Github.
1. Edit `pkg/brew/mcfly.rb` and update the version and SHAs. (`shasum -a 256 ...`)
1. Edit `../homebrew-mcfly/pkg/brew/mcfly.rb` too.
1. `cp pkg/brew/mcfly.rb ../homebrew-mcfly/pkg/brew/mcfly.rb`
1. Compare with `diff ../homebrew-mcfly/pkg/brew/mcfly.rb ../mcfly/pkg/brew/mcfly.rb ; diff ../homebrew-mcfly/HomebrewFormula/mcfly.rb ../mcfly/HomebrewFormula/mcfly.rb`
1. `git add -p && git ci -m 'Update homebrew' && git push`
1. `cd ../homebrew-mcfly && git add -p && git ci -m 'Update homebrew' && git push && cd ../mcfly`
1. `cargo publish`
1. TBD: update homebrew-core Formula at https://github.com/Homebrew/homebrew-core/blob/master/Formula/m/mcfly.rb
44 changes: 44 additions & 0 deletions pkg/brew/mcfly.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# To install:
# brew tap cantino/mcfly
# brew install mcfly
#
# To remove:
# brew uninstall mcfly
# brew untap cantino/mcfly

class Mcfly < Formula
version 'v0.8.1'
desc "McFly"
homepage "https://github.com/cantino/mcfly"

if OS.mac?
url "https://github.com/cantino/mcfly/releases/download/#{version}/mcfly-#{version}-x86_64-apple-darwin.tar.gz"
sha256 "db8d125c040fa9f97ba9b7777d1109ff2598db386f42e79e24aef66556500c11"
elsif OS.linux?
url "https://github.com/cantino/mcfly/releases/download/#{version}/mcfly-#{version}-x86_64-unknown-linux-musl.tar.gz"
sha256 "31231a4085f73eef41ab222e08518b7912cce55e7c1396931818a0fbfacf4fef"
end

def install
bin.install "mcfly"
end

def caveats
<<~EOS
ONE MORE STEP!

Add the following to the end of your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish file.

Bash:
eval "$(mcfly init bash)"

Zsh:
eval "$(mcfly init zsh)"

Fish:
mcfly init fish | source

You will need to restart your terminal when first installing and on some updates. If you receive a McFly error when running commands, try restarting your terminal.
EOS
end
end
Loading