homebrew-core/Formula/django-completion.rb

27 lines
791 B
Ruby

class DjangoCompletion < Formula
desc "Bash completion for Django"
homepage "https://www.djangoproject.com/"
url "https://github.com/django/django/archive/4.1.2.tar.gz"
sha256 "42874d84692e31874d6430c365cf298bbe8faf957cc8bb0c8804419fb4c71304"
license "BSD-3-Clause"
head "https://github.com/django/django.git", branch: "main"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "97079bbea0ced8650aa068970fa00de75d8504f58837b0b1ac5d54ef9146489f"
end
def install
bash_completion.install "extras/django_bash_completion" => "django"
end
test do
assert_match "-F _django_completion",
shell_output("bash -c 'source #{bash_completion}/django && complete -p django-admin'")
end
end