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

add homebrew universal binary cask #33

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions homebrew/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# FeatureBase Homebrew Cask
This is a Homebrew Cask example for installing featurebase with [Homebrew](https://brew.sh/).

## Copy the Cask File
Copy the `featurebase.rb` cask file to the proper location:

```
git clone https://github.com/FeatureBaseDB/featurebase-examples.git
cd featurebase-examples/homebrew/
cp featurebase.rb /opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/featurebase.rb
```

## Install the Cask File
Using the `brew install` command install the `featurebase` binary without quarantining it on macOS:

```
brew install --no-quarantine featurebase
```

## Run FeatureBase
To run FeatureBase, enter the following:

```featurebase server```

*OUTPUT*:

```
2023-03-06T23:44:48.100589Z INFO: Molecula Pilosa v3.33.0 (Mar 2 2023 12:06AM, 9386fc7) go1.19.3
2023-03-06T23:44:48.118834Z INFO: cwd: /Users/kord
2023-03-06T23:44:48.118838Z INFO: cmd line: featurebase server
2023-03-06T23:44:48.190867Z INFO: enabled Web UI at :10101
2023-03-06T23:44:48.191180Z INFO: open server. PID 63873
...
```

## Uninstall FeatureBase
Uninstall the cask using:

```
brew uninstall featurebase
```

16 changes: 16 additions & 0 deletions homebrew/featurebase.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cask "featurebase" do
version "3.33.0"
sha256 "5bf8a675ccf36d55bca66424d144ac18a8f21000212cdd77058e52e2fc0fc03f"

url "https://github.com/FeatureBaseDB/featurebase/releases/download/v#{version}/featurebase-v#{version}-brew-darwin-universal.tgz"
name "featurebase"
desc "crazy fast distributed b-tree index with SQL"
homepage "https://featurebase.com/"

livecheck do
url :url
regex(/^v?\.?(\d+(?:\.\d+)+)$/i)
end

binary "featurebase"
end
3 changes: 3 additions & 0 deletions homebrew/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

brew install --no-quarantine featurebase