Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / e / energy.rb
blob28299392d1f92df54d69f44d14d2b8b1426965b7
1 class Energy < Formula
2   desc "CLI is used to initialize the Energy development environment tools"
3   homepage "https://energye.github.io"
4   url "https://github.com/energye/energy/archive/refs/tags/v2.5.3.tar.gz"
5   sha256 "0b0c2edb114647ef7baa72bbebe04643a179f03b2700439087027d7dd0ab6eb2"
6   license "Apache-2.0"
8   bottle do
9     sha256 cellar: :any_skip_relocation, arm64_sequoia: "e000966c011ae82572a14fe24a554ba75a48babd1c3dc9dfea76932cce543b0a"
10     sha256 cellar: :any_skip_relocation, arm64_sonoma:  "e000966c011ae82572a14fe24a554ba75a48babd1c3dc9dfea76932cce543b0a"
11     sha256 cellar: :any_skip_relocation, arm64_ventura: "e000966c011ae82572a14fe24a554ba75a48babd1c3dc9dfea76932cce543b0a"
12     sha256 cellar: :any_skip_relocation, sonoma:        "7960f117db901c57acaa881bbfc28afe0577376944b7aac075ad718b311b8863"
13     sha256 cellar: :any_skip_relocation, ventura:       "7960f117db901c57acaa881bbfc28afe0577376944b7aac075ad718b311b8863"
14     sha256 cellar: :any_skip_relocation, x86_64_linux:  "f90ac82e49f93aecf5662833e3eb884ec5f99171ddcfb710fe1864d1f1c5bebd"
15   end
17   depends_on "go" => :build
19   def install
20     cd "cmd/energy" do
21       system "go", "build", *std_go_args(ldflags: "-s -w")
22     end
23   end
25   test do
26     output = shell_output("#{bin}/energy cli -v")
27     assert_match "CLI Current: v#{version}", output
28     assert_match "CLI Latest : v#{version}", output
30     assert_match "https://energy.yanghy.cn", shell_output("#{bin}/energy env")
31   end
32 end