websocketd: fix version flag passing

Go is getting increasingly grumpy about not having `=` between `main.version`
and the version. Want to start fixing these before Go inevitably cuts a major
release that manages to break every Go-using formulae in Homebrew.

Chops some other unnecessary lines as well here.
This commit is contained in:
Dominyk Tiller 2016-07-19 11:02:38 +01:00
parent 0fa128ef20
commit 64e871171b

View file

@ -26,15 +26,14 @@ class Websocketd < Formula
end
def install
ENV["GOBIN"] = bin
ENV["GOPATH"] = buildpath
ENV["GOHOME"] = buildpath
mkdir_p buildpath/"src/github.com/joewalnes/"
ln_sf buildpath, buildpath/"src/github.com/joewalnes/websocketd"
Language::Go.stage_deps resources, buildpath/"src"
system "go", "build", "-ldflags", "-X main.version #{version}", "-o", bin/"websocketd", "main.go", "config.go", "help.go", "version.go"
system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"websocketd",
"main.go", "config.go", "help.go", "version.go"
man1.install "release/websocketd.man" => "websocketd.1"
end