From ce6950335676867d2dd886f78f5bcb86d2a0bea2 Mon Sep 17 00:00:00 2001 From: Kord Campbell Date: Tue, 7 Mar 2023 12:28:17 -0600 Subject: [PATCH 1/2] add homebrew universal binary cask --- homebrew/README.md | 42 +++++++++++++++++++++++++++++++++++++++++ homebrew/featurebase.rb | 16 ++++++++++++++++ homebrew/install.sh | 3 +++ 3 files changed, 61 insertions(+) create mode 100644 homebrew/README.md create mode 100644 homebrew/featurebase.rb create mode 100755 homebrew/install.sh diff --git a/homebrew/README.md b/homebrew/README.md new file mode 100644 index 0000000..c72a698 --- /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 /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 From d1eac8434e35470b3956cd735f30ef0eb30fd68d Mon Sep 17 00:00:00 2001 From: Kord Campbell Date: Tue, 7 Mar 2023 12:32:39 -0600 Subject: [PATCH 2/2] fix copy --- homebrew/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homebrew/README.md b/homebrew/README.md index c72a698..c614257 100644 --- a/homebrew/README.md +++ b/homebrew/README.md @@ -6,8 +6,8 @@ Copy the `featurebase.rb` cask file to the proper location: ``` git clone https://github.com/FeatureBaseDB/featurebase-examples.git -cd featurebase-examples/homebrew -cp /opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/featurebase.rb +cd featurebase-examples/homebrew/ +cp featurebase.rb /opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/featurebase.rb ``` ## Install the Cask File