Skip to content

Commit 0c705f1

Browse files
committed
WIP
0 parents  commit 0c705f1

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

Formula/ironfish-node.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class IronfishNode < Formula
2+
desc "node.js dependency for ironfish"
3+
homepage "https://ironfnish.network"
4+
url "https://cli-assets.heroku.com/homebrew/node-12.16.2.tar.xz"
5+
sha256 "3be1a9fb2715f62561912d6e824f5e8dc2d64cf7e074f6c4ac8b5c9b4a836761"
6+
7+
def install
8+
share.install buildpath/"node"
9+
end
10+
11+
# def test
12+
# system bin/"node", "version"
13+
# end
14+
end

Formula/ironfish.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
class Ironfish < Formula
2+
desc "Everything you need to get started with Ironfish"
3+
homepage "https://ironfish.network"
4+
url "https://cli-assets.heroku.com/heroku-v7.47.0/heroku-v7.47.0.tar.xz"
5+
sha256 "a0b3d142d9c860c0fcce5dc7dfcd9f5f6ce68704e6809202874040aac8ef83c1"
6+
depends_on "heroku/brew/heroku-node"
7+
8+
def install
9+
inreplace "bin/ironfish", /^CLIENT_HOME=/, "export IRONFISH_OCLIF_CLIENT_HOME=#{lib/"client"}\nCLIENT_HOME="
10+
inreplace "bin/ironfish", "\"$DIR/node\"", "#{Formula["ironfish-node"].opt_share}/node"
11+
libexec.install Dir["*"]
12+
bin.install_symlink libexec/"bin/ironfish"
13+
14+
bash_completion.install "#{libexec}/node_modules/@ironfish-cli/plugin-autocomplete/autocomplete/brew/bash"
15+
zsh_completion.install "#{libexec}/node_modules/@ironfish-cli/plugin-autocomplete/autocomplete/brew/zsh/_ironfish"
16+
end
17+
18+
def caveats; <<~EOS
19+
To use the Ironfish CLI's autocomplete --
20+
Via homebrew's shell completion:
21+
1) Follow homebrew's install instructions https://docs.brew.sh/Shell-Completion
22+
NOTE: For zsh, as the instructions mention, be sure compinit is autoloaded
23+
and called, either explicitly or via a framework like oh-my-zsh.
24+
2) Then run
25+
$ ironfish autocomplete --refresh-cache
26+
27+
OR
28+
29+
Use our standalone setup:
30+
1) Run and follow the install steps:
31+
$ ironfish autocomplete
32+
EOS
33+
end
34+
35+
test do
36+
system bin/"ironfish", "version"
37+
end
38+
end

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Ironfish Homebrew Tap
2+
-------------------
3+
4+
Install the Ironfish CLI with
5+
6+
$ brew install ironfish
7+
8+
For more information, visit https://ironfish.network

scripts/test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
brew update
6+
brew install Formula/ironfish.rb
7+
ironfish version

0 commit comments

Comments
 (0)