diff --git a/Formula/lhctl@0.7.rb b/Formula/lhctl@0.7.rb new file mode 100644 index 0000000..5e1c399 --- /dev/null +++ b/Formula/lhctl@0.7.rb @@ -0,0 +1,20 @@ +class Lhctl < Formula + desc "LittleHorse CLI for managing all things LittleHorse" + homepage "https://littlehorse.dev/docs/developer-guide/lhctl" + url "https://github.com/littlehorse-enterprises/littlehorse.git", + tag: "0.7.0-alpha.1", + revision: "79b522d687aa2a5f56001fcde710f2ded2378745" + license "SSPL-1.0" + head "https://github.com/littlehorse-enterprises/littlehorse.git", branch: "master" + + depends_on "go" => :build + + def install + ldflags = "-X main.version=#{version} -X main.buildSource=homebrew" + system "go", "build", "-C", "lhctl", *std_go_args(ldflags: ldflags) + end + + test do + assert_match "Generally a UserTaskRun", shell_output("#{bin}/lhctl --help") + end +end