43 lines
1.5 KiB
Ruby
43 lines
1.5 KiB
Ruby
class Stgit < Formula
|
|
desc "Manage Git commits as a stack of patches"
|
|
homepage "https://stacked-git.github.io"
|
|
url "https://github.com/stacked-git/stgit/releases/download/v1.1/stgit-1.1.tar.gz"
|
|
sha256 "fc9674943c8e5534122ad96646078b4f07b7b69fc202b57eaa9b430ee13f0d9b"
|
|
license "GPL-2.0-only"
|
|
head "https://github.com/stacked-git/stgit.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "227e183a55224f7d8386a57330c37d7e3ef0d472b35603ed42b78ed04142dffa"
|
|
end
|
|
|
|
depends_on "asciidoc" => :build
|
|
depends_on "xmlto" => :build
|
|
depends_on "python@3.9"
|
|
|
|
def install
|
|
ENV["PYTHON"] = Formula["python@3.9"].opt_bin/"python3"
|
|
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
|
system "make", "prefix=#{prefix}", "all"
|
|
system "make", "prefix=#{prefix}", "install"
|
|
system "make", "prefix=#{prefix}", "install-doc"
|
|
bash_completion.install "completion/stgit.bash"
|
|
fish_completion.install "completion/stg.fish"
|
|
zsh_completion.install "completion/stgit.zsh" => "_stgit"
|
|
end
|
|
|
|
test do
|
|
system "git", "init"
|
|
system "git", "config", "user.name", "BrewTestBot"
|
|
system "git", "config", "user.email", "brew@test.bot"
|
|
(testpath/"test").write "test"
|
|
system "git", "add", "test"
|
|
system "git", "commit", "--message", "Initial commit", "test"
|
|
system "#{bin}/stg", "--version"
|
|
system "#{bin}/stg", "init"
|
|
system "#{bin}/stg", "new", "-m", "patch0"
|
|
(testpath/"test").append_lines "a change"
|
|
system "#{bin}/stg", "refresh"
|
|
system "#{bin}/stg", "log"
|
|
end
|
|
end
|