2011-10-18 13:48:05 +00:00
|
|
|
class GitNow < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Light, temporary commits for git"
|
2015-04-25 20:38:16 +00:00
|
|
|
homepage "https://github.com/iwata/git-now"
|
|
|
|
url "https://github.com/iwata/git-now.git",
|
|
|
|
:tag => "v0.1.1.0",
|
|
|
|
:revision => "a07a05893b9ddf784833b3d4b410c843633d0f71"
|
2011-10-18 13:48:05 +00:00
|
|
|
|
2015-04-25 20:38:16 +00:00
|
|
|
head "https://github.com/iwata/git-now.git"
|
2011-10-18 13:48:05 +00:00
|
|
|
|
2015-04-25 20:38:16 +00:00
|
|
|
depends_on "gnu-getopt"
|
2011-10-18 13:48:05 +00:00
|
|
|
|
|
|
|
def install
|
2013-06-29 15:55:27 +00:00
|
|
|
system "make", "prefix=#{libexec}", "install"
|
2011-10-18 13:48:05 +00:00
|
|
|
|
2015-04-25 20:38:16 +00:00
|
|
|
(bin/"git-now").write <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
PATH=#{Formula["gnu-getopt"].opt_bin}:$PATH #{libexec}/bin/git-now "$@"
|
|
|
|
EOS
|
2011-10-18 13:48:05 +00:00
|
|
|
|
2015-04-25 20:38:16 +00:00
|
|
|
zsh_completion.install "etc/_git-now"
|
|
|
|
end
|
2011-10-18 13:48:05 +00:00
|
|
|
|
2015-04-25 20:38:16 +00:00
|
|
|
test do
|
|
|
|
(testpath/".gitconfig").write <<-EOS.undent
|
|
|
|
[user]
|
|
|
|
name = Real Person
|
|
|
|
email = notacat@hotmail.cat
|
|
|
|
EOS
|
|
|
|
touch "file1"
|
|
|
|
system "git", "init"
|
|
|
|
system "git", "add", "file1"
|
|
|
|
system bin/"git-now"
|
|
|
|
assert_match "from now", shell_output("git log -1")
|
|
|
|
end
|
|
|
|
end
|