Skip to content

Commit

Permalink
go-task: turn off CGO
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Mar 5, 2024
1 parent 527c096 commit 64c50da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Formula/g/go-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ class GoTask < Formula
conflicts_with "task", because: "both install `task` binaries"

def install
ENV["CGO_ENABLED"] = "0"

ldflags = %W[
-s -w
-X github.com/go-task/task/v3/internal/version.version=#{version}
]

system "go", "build", *std_go_args(ldflags: ldflags, output: bin/"task"), "./cmd/task"

bash_completion.install "completion/bash/task.bash" => "task"
zsh_completion.install "completion/zsh/_task" => "_task"
fish_completion.install "completion/fish/task.fish"
Expand Down

0 comments on commit 64c50da

Please sign in to comment.