-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose@2.23.3.rb
41 lines (35 loc) · 1.35 KB
/
docker-compose@2.23.3.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class DockerComposeAT2233 < Formula
desc "Isolated development environments using Docker"
homepage "https://docs.docker.com/compose/"
url "https://github.com/docker/compose/archive/refs/tags/v2.23.3.tar.gz"
sha256 "29ba96c8d398fbc6f7c791c65e70b97e7df116223f2996062441093258d914fe"
license "Apache-2.0"
head "https://github.com/docker/compose.git", branch: "main"
conflicts_with "docker-compose", because: "docker-compose >= v2.24 has issues with our configuration"
# Upstream creates releases that use a stable tag (e.g., `v1.2.3`) but are
# labeled as "pre-release" on GitHub before the version is released, so it's
# necessary to use the `GithubLatest` strategy.
livecheck do
url :stable
strategy :github_latest
end
depends_on "go" => :build
def install
ldflags = %W[
-s -w
-X github.com/docker/compose/v2/internal.Version=#{version}
]
system "go", "build", *std_go_args(ldflags: ldflags, output: bin/"docker-compose"), "./cmd"
end
def caveats
<<~EOS
Compose is now a Docker plugin. For Docker to find this plugin, symlink it:
mkdir -p ~/.docker/cli-plugins
ln -sfn #{opt_bin}/docker-compose ~/.docker/cli-plugins/docker-compose
EOS
end
test do
output = shell_output(bin/"docker-compose up 2>&1", 14)
assert_match "no configuration file provided", output
end
end