homebrew-core/Formula/git-review.rb

66 lines
3.2 KiB
Ruby

class GitReview < Formula
include Language::Python::Virtualenv
desc "Submit git branches to gerrit for review"
homepage "https://opendev.org/opendev/git-review"
url "https://files.pythonhosted.org/packages/8e/5c/18f534e16b193be36d140939b79a8046e07f343b426054c084b12d59cf0b/git-review-2.3.1.tar.gz"
sha256 "24e938136eecb6e6cbb38b5e2b034a286b70b5bb8b5a2853585c9ed23636014f"
license "Apache-2.0"
head "https://opendev.org/opendev/git-review.git", branch: "master"
bottle do
rebuild 2
sha256 cellar: :any_skip_relocation, arm64_ventura: "9b140770d995b35fef5c00b3bfacdb325b8c5077b70ccfa9b5dfc29fdeb4e444"
sha256 cellar: :any_skip_relocation, arm64_monterey: "49d58c6cb4cac250cfd1664cc2eadffc4c84fc96d80ba6e4614c92397e20b408"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "46fa4da3efdd6f92200fb1259af57ba85e84aa164a6b6fd584a30585033fc702"
sha256 cellar: :any_skip_relocation, ventura: "d2aac9d3da25e04b033749b096e2dbef43a45340aecad4e206934b42fa804854"
sha256 cellar: :any_skip_relocation, monterey: "3f5ec02f7f35023ca2a234499576ded5ab471f342e7e88f83e17fe5a9b5cf4d2"
sha256 cellar: :any_skip_relocation, big_sur: "28eb3a5e2839815d42941d72246c08ab6fb5d9c8ac9ffa53a2866c91cf395e77"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4b1dc5dd061157c6913353b5a908c535a07dc046d783d7a0a7a0fe2ef3b590b2"
end
depends_on "python@3.11"
resource "certifi" do
url "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz"
sha256 "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/96/d7/1675d9089a1f4677df5eb29c3f8b064aa1e70c1251a0a8a127803158942d/charset-normalizer-3.0.1.tar.gz"
sha256 "ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz"
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/9d/ee/391076f5937f0a8cdf5e53b701ffc91753e87b07d66bae4a09aa671897bf/requests-2.28.2.tar.gz"
sha256 "98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/c5/52/fe421fb7364aa738b3506a2d99e4f3a56e079c0a798e9f4fa5e14c60922f/urllib3-1.26.14.tar.gz"
sha256 "076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"
end
def install
virtualenv_install_with_resources
man1.install Utils::Gzip.compress("git-review.1")
end
test do
system "git", "init"
system "git", "config", "user.name", "BrewTestBot"
system "git", "config", "user.email", "BrewTestBot@test.com"
system "git", "remote", "add", "gerrit", "https://github.com/Homebrew/brew.sh"
(testpath/".git/hooks/commit-msg").write "# empty - make git-review happy"
(testpath/"foo").write "test file"
system "git", "add", "foo"
system "git", "commit", "-m", "test"
system "#{bin}/git-review", "--dry-run"
end
end