2014-04-28 00:02:07 +00:00
|
|
|
class ObjcCodegenutils < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Three small tools to help work with XCode"
|
2014-04-28 00:02:07 +00:00
|
|
|
homepage "https://github.com/square/objc-codegenutils"
|
|
|
|
url "https://github.com/square/objc-codegenutils/archive/v1.0.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "98b8819e77e18029f1bda56622d42c162e52ef98f3ba4c6c8fcf5d40c256e845"
|
2014-04-28 00:02:07 +00:00
|
|
|
|
2014-05-30 23:03:52 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "6444a44bb506d0078b494d243475aa492da91b4a" => :mavericks
|
|
|
|
sha1 "115f70a9c8b61545630a14d7503d4e20c221f6cb" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-02-12 01:11:46 +00:00
|
|
|
head "https://github.com/square/objc-codegenutils.git"
|
|
|
|
|
2014-04-28 00:02:07 +00:00
|
|
|
depends_on :macos => :mountain_lion
|
2014-05-30 20:41:18 +00:00
|
|
|
depends_on :xcode => :build
|
2014-04-28 00:02:07 +00:00
|
|
|
|
|
|
|
def install
|
2015-08-03 12:55:31 +00:00
|
|
|
xcodebuild "-project", "codegenutils.xcodeproj", "-target", "assetgen", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build"
|
2014-04-28 00:02:07 +00:00
|
|
|
bin.install "build/Release/objc-assetgen"
|
2015-08-03 12:55:31 +00:00
|
|
|
xcodebuild "-target", "colordump", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build"
|
2014-04-28 00:02:07 +00:00
|
|
|
bin.install "build/Release/objc-colordump"
|
2015-08-03 12:55:31 +00:00
|
|
|
xcodebuild "-target", "identifierconstants", "-configuration", "Release", "SYMROOT=build", "OBJROOT=build"
|
2014-04-28 00:02:07 +00:00
|
|
|
bin.install "build/Release/objc-identifierconstants"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# Would do more verification here but it would require fixture Xcode projects not in the main repo
|
|
|
|
system "#{bin}/objc-assetgen", "-h"
|
|
|
|
system "#{bin}/objc-colordump", "-h"
|
|
|
|
system "#{bin}/objc-identifierconstants", "-h"
|
|
|
|
end
|
|
|
|
end
|