gatewayd-io / gatewayd

☁️ Cloud-native database gateway and framework for building data-driven applications ✨ Like API gateways, but for databases ✨
https://gatewayd.io
GNU Affero General Public License v3.0
226 stars 18 forks source link

Create brew install formula for macos #421

Open wilsonmar opened 10 months ago

wilsonmar commented 10 months ago

When users install using Homebrew, it's only one-step: brew install gatewayd

The install command can be executed on any folder because all formulas are placed in /usr/local/bin
so no changes to .bash_profile PATH is needed.
It also enables users to upgrade all formulae with one command.
 See https://setapp.com/how-to/install-homebrew-on-mac

Example See https://docs.brew.sh/Formula-Cookbook

cask "gatewayd" do
  version "0.8.10"
  sha256 "6af7f2d587b604de9c4789c029fa2b3164d7c694b36cec2f0c4c44e47e58843e"
  url "https://github.com/gatewayd-io/gatewayd/releases/download/v#{version}/gatewayd-darwin-amd64-v#{version}.tar.gz",
      verified: "https://github.com/gatewayd-io/gatewayd"

  name "GatewayD"
  desc "Cloud-native database gateway and framework for building data-driven applications - Like API gateways, for databases"
  homepage "https://docs.gatewayd.io/getting-started/installation/"
end
wilsonmar commented 10 months ago

I got license "AGPL-3.0-or-later" code from https://spdx.org/licenses/

wilsonmar commented 9 months ago

ERROR: This command is not returning the latest release but old release v0.8.9 git ls-remote --tags "https://github.com/gatewayd-io/gatewayd" | cut -d/ -f3- | tail -n1;

mostafa commented 9 months ago

Hey @wilsonmar,

Use sort by version and refname:

git ls-remote --tags --sort=v:refname "https://github.com/gatewayd-io/gatewayd" | cut -d/ -f3- | tail -n1;