gitversion 3.6.2 (new formula)

master
Asbjørn Ulsberg 2016-06-01 14:32:09 +02:00 committed by Mike McQuaid
parent d6e3b8c5c8
commit efd4b75b0c
1 changed files with 30 additions and 0 deletions

30
Formula/gitversion.rb Normal file
View File

@ -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