Skip to content

Commit

Permalink
Merge pull request Homebrew#202791 from alebcay/traefik-missing-webui
Browse files Browse the repository at this point in the history
traefik: ensure static files for webui get built
  • Loading branch information
BrewTestBot authored Dec 30, 2024
2 parents 885d7da + 4eb72b9 commit 520e267
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions Formula/t/traefik.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,31 @@ class Traefik < Formula
url "https://github.com/traefik/traefik/releases/download/v3.2.3/traefik-v3.2.3.src.tar.gz"
sha256 "957997222314116959ce2ff68b261e2b2bc5292566e799dd21e7512b5782feb7"
license "MIT"
revision 1
head "https://github.com/traefik/traefik.git", branch: "master"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "682c962bc6d9ab091d38512a3b2e8ef6f171b2da46a1692d191301af9e9030c0"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "682c962bc6d9ab091d38512a3b2e8ef6f171b2da46a1692d191301af9e9030c0"
sha256 cellar: :any_skip_relocation, arm64_ventura: "682c962bc6d9ab091d38512a3b2e8ef6f171b2da46a1692d191301af9e9030c0"
sha256 cellar: :any_skip_relocation, sonoma: "92ba05fa9a9657c8ec3a20a7586c530a126201cbfb7d48e66caf76fcd479ca55"
sha256 cellar: :any_skip_relocation, ventura: "92ba05fa9a9657c8ec3a20a7586c530a126201cbfb7d48e66caf76fcd479ca55"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3e84b3a32e720dd7b985c7c1c0bdb550746f201fe9c644a979335670706a291a"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "4278eda8ff317f2197e0dd4b3dbf7930347353b6d87b2eda8102f1fa95d53cc1"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "4278eda8ff317f2197e0dd4b3dbf7930347353b6d87b2eda8102f1fa95d53cc1"
sha256 cellar: :any_skip_relocation, arm64_ventura: "4278eda8ff317f2197e0dd4b3dbf7930347353b6d87b2eda8102f1fa95d53cc1"
sha256 cellar: :any_skip_relocation, sonoma: "49637254a846716d29d7ff3fe4b6541fa4cb6fda3b4d82abc5327a9572f93ef4"
sha256 cellar: :any_skip_relocation, ventura: "49637254a846716d29d7ff3fe4b6541fa4cb6fda3b4d82abc5327a9572f93ef4"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3734b0968cb61e192907d5bc9fd201ecd45cec2ddde2a3afd54e4abd638a9c0e"
end

depends_on "go" => :build
depends_on "node@22" => :build
depends_on "yarn" => :build

def install
ldflags = %W[
-s -w
-X github.com/traefik/traefik/v#{version.major}/pkg/version.Version=#{version}
]
cd "webui" do
system "yarn", "install", "--immutable"
system "yarn", "build"
end
system "go", "generate"
system "go", "build", *std_go_args(ldflags:), "./cmd/traefik"
end
Expand Down Expand Up @@ -59,6 +66,10 @@ def install
sleep 1
cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{ui_port}/dashboard/"
assert_match "200 OK", shell_output(cmd_ui)

# Make sure webui assets for dashboard are present at expected destination
cmd_ui = "curl -XGET http://127.0.0.1:#{ui_port}/dashboard/"
assert_match "<title>Traefik</title>", shell_output(cmd_ui)
ensure
Process.kill(9, pid)
Process.wait(pid)
Expand Down

0 comments on commit 520e267

Please sign in to comment.