Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bats-core 1.0.1 (new formula) #28977

Merged
merged 2 commits into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Formula/bats-core.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class BatsCore < Formula
desc "Bash Automated Testing System"
homepage "https://github.com/bats-core/bats-core"
url "https://github.com/bats-core/bats-core/archive/v1.0.1.tar.gz"
sha256 "821626f1e5058a4f25a95722399b460942f27535186a815a279e518b503f8de7"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add head to support --HEAD installs?

Copy link
Contributor Author

@kenden kenden Jun 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonkarns I can, but CONTRIBUTING.md
says to run
$ brew audit --new-formula bats-core
which then breaks with:

bats-core:
  * Formulae should not have a HEAD spec
Error: 1 problem in 1 formula

Trying anyway, maybe the jenkins config differs.

Copy link
Contributor Author

@kenden kenden Jun 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, Jenkins does not like it for new Formulae. Removing head from bats-core.


bottle :unneeded

conflicts_with "bats", :because => "both install `bats` executables"

def install
system "./install.sh", prefix
end

test do
(testpath/"test.sh").write <<~EOS
@test "addition using bc" {
result="$(echo 2+2 | bc)"
[ "$result" -eq 4 ]
}
EOS
assert_match "addition", shell_output("#{bin}/bats test.sh")
end
end
2 changes: 2 additions & 0 deletions Formula/bats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Bats < Formula

bottle :unneeded

conflicts_with "bats-core", :because => "both install `bats` executables"

def install
system "./install.sh", prefix
end
Expand Down