gitversion 3.6.2 (new formula)
parent
d6e3b8c5c8
commit
efd4b75b0c
|
@ -0,0 +1,30 @@
|
|||
class Gitversion < Formula
|
||||
desc "Easy semantic versioning for projects using Git"
|
||||
homepage "https://github.com/GitTools/GitVersion"
|
||||
url "https://www.nuget.org/api/v2/package/GitVersion.CommandLine/3.6.2"
|
||||
version "3.6.2"
|
||||
sha256 "db05ebacfb76ddca26180f0c70060fbb89800e434d3d55b524785d0da37dbac8"
|
||||
|
||||
bottle :unneeded
|
||||
|
||||
depends_on "mono" => :recommended
|
||||
|
||||
def install
|
||||
libexec.install Dir["*"]
|
||||
(bin/"gitversion").write <<-EOS.undent
|
||||
#!/bin/sh
|
||||
exec "mono" "#{libexec}/tools/GitVersion.exe" "$@"
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
# Circumvent GitVersion's build server detection scheme:
|
||||
ENV["JENKINS_URL"] = nil
|
||||
|
||||
(testpath/"test.txt").write("test")
|
||||
system "git", "init"
|
||||
system "git", "add", "test.txt"
|
||||
system "git", "commit", "-q", "--author='Test <test@example.com>'", "--message='Test'"
|
||||
assert_match '"FullSemVer":"0.1.0+0"', shell_output("#{bin}/gitversion -output json", 0)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue