File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ class Oasis < Formula
2
+ desc "CLI for interacting with the Oasis Protocol network"
3
+ homepage "https://github.com/oasisprotocol/cli"
4
+ url "https://github.com/oasisprotocol/cli/archive/refs/tags/v0.14.3.tar.gz"
5
+ sha256 "6e8a3de59931ac81e6fc77cfc01553041b1b08e159a6d1547b6ffdcddcffb13a"
6
+ license "Apache-2.0"
7
+ head "https://github.com/oasisprotocol/cli.git" , branch : "master"
8
+
9
+ depends_on "go" => :build
10
+
11
+ def install
12
+ ldflags = %W[
13
+ -s -w
14
+ -X github.com/oasisprotocol/cli/version.Software=#{ version }
15
+ -X github.com/oasisprotocol/cli/cmd.DisableUpdateCmd=true
16
+ ]
17
+
18
+ system "go" , "build" , *std_go_args ( ldflags :)
19
+ end
20
+
21
+ test do
22
+ assert_match version . to_s , shell_output ( "#{ bin } /oasis --version" )
23
+ assert_match "CLI for interacting with the Oasis network" , shell_output ( "#{ bin } /oasis --help" )
24
+ assert_match "Error: unknown command \" update\" for \" oasis\" " , shell_output ( "#{ bin } /oasis update 2>&1" , 1 )
25
+ assert_match "Error: no address given and no wallet configured" , shell_output ( "#{ bin } /oasis account show 2>&1" , 1 )
26
+ end
27
+ end
You can’t perform that action at this time.
0 commit comments