diff --git a/homebrew/README.md b/homebrew/README.md new file mode 100644 index 0000000..c614257 --- /dev/null +++ b/homebrew/README.md @@ -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 +``` + diff --git a/homebrew/featurebase.rb b/homebrew/featurebase.rb new file mode 100644 index 0000000..9ec3132 --- /dev/null +++ b/homebrew/featurebase.rb @@ -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 diff --git a/homebrew/install.sh b/homebrew/install.sh new file mode 100755 index 0000000..ccc0e86 --- /dev/null +++ b/homebrew/install.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +brew install --no-quarantine featurebase \ No newline at end of file