elvish 0.12

update ldflags for setting the version
match version in the test

Closes #29946.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2018-07-10 21:19:33 -07:00
parent fb6a11299a
commit b0bbdfb9c1

View file

@ -1,8 +1,8 @@
class Elvish < Formula
desc "Friendly and expressive shell"
homepage "https://github.com/elves/elvish"
url "https://github.com/elves/elvish/archive/0.11.tar.gz"
sha256 "711f67d8730990deed00c3e0c59198c8a51c8441371416faab5ef603c26010b6"
url "https://github.com/elves/elvish/archive/0.12.tar.gz"
sha256 "edd03f4acf50beb03a663804e4da8b9d13805d471245c47c1b71f24c125cb9a2"
head "https://github.com/elves/elvish.git"
bottle do
@ -19,13 +19,14 @@ class Elvish < Formula
(buildpath/"src/github.com/elves/elvish").install buildpath.children
cd "src/github.com/elves/elvish" do
system "go", "build", "-ldflags",
"-X github.com/elves/elvish/build.Version=#{version}", "-o",
"-X github.com/elves/elvish/buildinfo.Version=#{version}", "-o",
bin/"elvish"
prefix.install_metafiles
end
end
test do
assert_equal version.to_s, shell_output("#{bin}/elvish -version").chomp
assert_match "hello", shell_output("#{bin}/elvish -c 'echo hello'")
end
end