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

chore: add homebrew formula #3950

Merged
merged 11 commits into from
Feb 15, 2024
14 changes: 14 additions & 0 deletions .gitpod/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ ignite chain serve

## Install Ignite CLI locally

Using a package manager, you can install Ignite CLI on macOS:
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved

```sh
brew install ignite
```

or GNU/Linux:

```sh
snap install ignite --classic
```

Or manually using the following command:

```sh
curl https://get.ignite.com/cli | bash
```
Expand Down
29 changes: 16 additions & 13 deletions docs/docs/01-welcome/02-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@ ignite version

## Installing Ignite CLI

To install the latest version of the `ignite` binary use the following command.
To install the latest version of the `ignite` binary use a package manager on macOS:

```bash
curl https://get.ignite.com/cli! | bash
```sh
brew install ignite
```

This command invokes `curl` to download the installation script and pipes the output to `bash` to perform the
installation. The `ignite` binary is installed in `/usr/local/bin`.
or GNU/Linux:

To learn more or customize the installation process, see the [installer docs](https://github.com/ignite/installer) on
GitHub.
```sh
snap install ignite --classic
```

### Install manually

:::tip
Alternatively, you can install Ignite CLI using a package manager on GNU/Linux:
Alternatively, you can install the latest version of the `ignite` binary use the following command:

```bash
snap install ignite --classic
curl https://get.ignite.com/cli! | bash
```

:::

### Write permission
This command invokes `curl` to download the installation script and pipes the output to `bash` to perform the
installation. The `ignite` binary is installed in `/usr/local/bin`.

Ignite CLI installation requires write permission to the `/usr/local/bin/` directory. If the installation fails because
you do not have write permission to `/usr/local/bin/`, run the following command:
Expand Down Expand Up @@ -87,6 +87,9 @@ In this case, use sudo before `curl` and before `bash`:
sudo curl https://get.ignite.com/cli | sudo bash
```

To learn more or customize the installation process, see the [installer docs](https://github.com/ignite/installer) on
GitHub.

## Upgrading your Ignite CLI installation {#upgrade}

Before you install a new version of Ignite CLI, remove all existing Ignite CLI installations.
Expand Down
22 changes: 22 additions & 0 deletions packaging/brew/ignite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Ignite < Formula
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
desc "Build, launch, and maintain any crypto application with Ignite CLI"
homepage "https://github.com/ignite/cli"
url "https://github.com/ignite/cli/archive/refs/tags/v28.2.0.tar.gz"
sha256 "556f953fd7f922354dea64e7b3dade5dd75b3f62ece93167e2ba126cac27602e"
license "Apache-2.0"

depends_on "go"
depends_on "node"
jeronimoalbi marked this conversation as resolved.
Show resolved Hide resolved

def install
bin.mkpath
system "go", "build", "-mod=readonly", *std_go_args, "-o", bin/"ignite", "./ignite/cmd/ignite/..."
end

test do
# assert scaffolding works
ENV["DO_NOT_TRACK"] = "1"
system bin/"ignite", "s", "chain", "mars"
assert_predicate testpath/"mars/go.mod", :exist?
end
end
12 changes: 11 additions & 1 deletion packaging/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,14 @@ A [github action](../.github/workflows/release-binary.yml) is used to build and

## HomeBrew

TBD.
Read the following resources to understand HomeBrew.

* <https://docs.brew.sh/>
* <https://docs.brew.sh/Formula-Cookbook>

```bash
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --interactive ignite
brew audit --new-formula ignite
```

The formula is published in the [homebrew-core](https://github.com/homebrew/homebrew-core) repository: <https://github.com/Homebrew/homebrew-core/pull/161938>
12 changes: 5 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,23 @@ so you can focus on writing business logic.

### Installation

You can install Ignite with one simple command:
You can install Ignite a package manager on macOS:

```sh
curl https://get.ignite.com/cli! | bash
brew install ignite
```

Or using a package manager on GNU/Linux:
or GNU/Linux:

```sh
snap install ignite --classic
```

<!--
or macOS:
Or manually using the following command:

```sh
brew install ignite
curl https://get.ignite.com/cli! | bash
```
-->

<details>
<summary>Troubleshoot</summary>
Expand Down
Loading