homebrew-core/Formula/vapor.rb

28 lines
859 B
Ruby

class Vapor < Formula
desc "Command-line tool for Vapor (Server-side Swift web framework)"
homepage "https://vapor.codes"
url "https://github.com/vapor/toolbox/archive/18.2.2.tar.gz"
sha256 "96a6f5ff72cfa1e0f95f53122590f3c20eb123ee857f53f74d011673f0fea4ab"
license "MIT"
head "https://github.com/vapor/toolbox.git"
bottle do
cellar :any_skip_relocation
sha256 "f49f6f3ec03a5d17c155c4ea7bb72eecd766c669c32fec89bbd5bb1c65d84226" => :catalina
end
depends_on xcode: "11.4"
def install
system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", \
"-cross-module-optimization", "--enable-test-discovery"
mv ".build/release/vapor", "vapor"
bin.install "vapor"
end
test do
system "vapor", "new", "hello-world", "-n"
assert_predicate testpath/"hello-world/Package.swift", :exist?
end
end