From 102de272eb6c6ec58a0a56bf355139687d083296 Mon Sep 17 00:00:00 2001 From: Saagar Jha Date: Sat, 21 Jan 2017 15:03:49 -0800 Subject: [PATCH] swimat 1.2.1 (new formula) Command line tool for Swimat, a Swift formatter Note: Swimat is already available on Homebrew Cask as a Source Editor Extension (packaged as a .app). This formula is the command line tool only. Closes #9119. Signed-off-by: Alex Dunn --- Formula/swimat.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Formula/swimat.rb diff --git a/Formula/swimat.rb b/Formula/swimat.rb new file mode 100644 index 0000000000..8826ed4fdb --- /dev/null +++ b/Formula/swimat.rb @@ -0,0 +1,23 @@ +class Swimat < Formula + desc "Command Line Tool to help format Swift code" + homepage "https://github.com/Jintin/Swimat" + url "https://github.com/Jintin/Swimat/archive/v1.2.1.tar.gz" + sha256 "ef2f0fe83ca779698679a1a110ebc6ae9c5a457805b6647af79db32cfed0a018" + head "https://github.com/Jintin/Swimat.git" + + depends_on :xcode => "8.0" + + def install + xcodebuild "-target", "CLI", + "-configuration", "Release", + "CODE_SIGN_IDENTITY=", + "SYMROOT=build" + bin.install "build/Release/swimat" + end + + test do + system "#{bin}/swimat", "-h" + (testpath/"SwimatTest.swift").write("struct SwimatTest {}") + system "#{bin}/swimat", "#{testpath}/SwimatTest.swift" + end +end