Skip to content

Instantly share code, notes, and snippets.

@cockscomb
Created December 18, 2019 22:17
Show Gist options
  • Save cockscomb/183acd19d2f5e127045dc43c6c472535 to your computer and use it in GitHub Desktop.
Save cockscomb/183acd19d2f5e127045dc43c6c472535 to your computer and use it in GitHub Desktop.
Homebrew Formula of apple/swift-format
class SwiftFormat < Formula
desc "Formatting technology for Swift source code"
homepage "https://github.com/apple/swift-format"
url "https://github.com/apple/swift-format.git", :branch => "swift-5.1-branch"
head "https://github.com/apple/swift-format.git"
depends_on :xcode => ["11.0", :build]
def install
system "swift", "build", "--configuration", "release",
"--disable-sandbox",
"--build-path", "#{buildpath}/swift-format"
system "install", "-d", "#{prefix}/bin"
system "install", "#{buildpath}/swift-format/release/swift-format", "#{prefix}/bin"
end
test do
system "#{bin}/swift-format", "--version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment