homebrew-core/Formula/flank.rb

37 lines
950 B
Ruby

class Flank < Formula
desc "Massively parallel Android and iOS test runner for Firebase Test Lab"
homepage "https://github.com/Flank/flank"
url "https://github.com/Flank/flank/releases/download/v20.12.0/flank.jar"
sha256 "9acb1065436e83e581bfc1e9e2c44e450cee6831587a24dbb2f2d7f95bc41737"
license "Apache-2.0"
livecheck do
url "https://github.com/Flank/flank/releases/latest"
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
end
bottle :unneeded
depends_on "openjdk"
def install
libexec.install "flank.jar"
bin.write_jar_script libexec/"flank.jar", "flank"
end
test do
(testpath/"flank.yml").write <<~EOS
gcloud:
device:
- model: Pixel2
version: "29"
locale: en
orientation: portrait
EOS
output = shell_output("#{bin}/flank android doctor")
assert_match "version: v#{version}", output
assert_match "Valid yml file", output
end
end