2020-08-24 14:39:29 +00:00
|
|
|
require "language/node"
|
|
|
|
|
|
|
|
class Cdktf < Formula
|
|
|
|
desc "Cloud Development Kit for Terraform"
|
|
|
|
homepage "https://github.com/hashicorp/terraform-cdk"
|
|
|
|
url "https://registry.npmjs.org/cdktf-cli/-/cdktf-cli-0.0.16.tgz"
|
|
|
|
sha256 "3b6eff02a32783ef6bccda828a04fa9996e8ac0164ab423260c3bc6e50abcb2f"
|
2020-08-24 15:52:11 +00:00
|
|
|
license "MPL-2.0"
|
2020-08-24 14:39:29 +00:00
|
|
|
|
|
|
|
depends_on "node"
|
|
|
|
depends_on "terraform"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match "Cannot initialize a project in a non-empty directory",
|
|
|
|
shell_output("#{bin}/cdktf init python-app 2>&1", 1)
|
|
|
|
end
|
|
|
|
end
|