mkcert 0.9.0 (new formula)
Closes #29733. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
b84b2f75ee
commit
550954109f
1 changed files with 29 additions and 0 deletions
29
Formula/mkcert.rb
Normal file
29
Formula/mkcert.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
class Mkcert < Formula
|
||||
desc "Simple tool to make locally trusted development certificates"
|
||||
homepage "https://github.com/FiloSottile/mkcert"
|
||||
url "https://github.com/FiloSottile/mkcert/archive/v0.9.0.tar.gz"
|
||||
sha256 "cae5871f83cb4c43e0475b69cf6325e5f731a8597e1557a4e9f042510f93d45b"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
(buildpath/"src/github.com/FiloSottile/mkcert").install buildpath.children
|
||||
|
||||
cd "src/github.com/FiloSottile/mkcert" do
|
||||
system "go", "build", "-o", bin/"mkcert"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
ENV["CAROOT"] = testpath
|
||||
system bin/"mkcert", "brew.test"
|
||||
assert_predicate testpath/"brew.test.pem", :exist?
|
||||
assert_predicate testpath/"brew.test-key.pem", :exist?
|
||||
output = (testpath/"brew.test.pem").read
|
||||
assert_match "-----BEGIN CERTIFICATE-----", output
|
||||
output = (testpath/"brew.test-key.pem").read
|
||||
assert_match "-----BEGIN PRIVATE KEY-----", output
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue