30 lines
940 B
Ruby
30 lines
940 B
Ruby
class DockerComposeCompletion < Formula
|
|
desc "Completion script for docker-compose"
|
|
homepage "https://docs.docker.com/compose/completion/"
|
|
url "https://github.com/docker/compose/archive/1.27.2.tar.gz"
|
|
sha256 "685abdef2720fdab30f8f9648d70e80f3a8b93be444c1829f9cd6e2ff91d11ae"
|
|
license "Apache-2.0"
|
|
head "https://github.com/docker/compose.git"
|
|
|
|
livecheck do
|
|
url :head
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
bottle :unneeded
|
|
|
|
conflicts_with "docker-compose",
|
|
because: "docker-compose already includes completion scripts"
|
|
|
|
def install
|
|
bash_completion.install "contrib/completion/bash/docker-compose"
|
|
fish_completion.install "contrib/completion/fish/docker-compose.fish"
|
|
zsh_completion.install "contrib/completion/zsh/_docker-compose"
|
|
end
|
|
|
|
test do
|
|
assert_match "-F _docker_compose",
|
|
shell_output("bash -c 'source #{bash_completion}/docker-compose && complete -p docker-compose'")
|
|
end
|
|
end
|