Patrick-Kladek / ScreenshotFramer

Create localized App Store screenshots
Other
722 stars 40 forks source link

Homebrew support #15

Open nikolaykasyanov opened 6 years ago

nikolaykasyanov commented 6 years ago

It'd be great to be able to deploy the app on CI servers automatically, for example using brew.

nikolaykasyanov commented 6 years ago

A have a formula prototype, it uses our fork though:

class ScreenshotframerCli < Formula
  desc "With Screenshot Framer you can easily create nice-looking and localized App Store Images."
  homepage "https://github.com/IdeasOnCanvas/ScreenshotFramer"
  url "https://github.com/flix-tech/ScreenshotFramer.git",
    :branch => "flixtech",
    :revision => "7251745847a41e276c99c73716d0c41c8854dcf0"
  version "1.0"
  revision 1

  depends_on :xcode => ["9.0", :build]

  def install
    system "ln -sf /usr/bin/true ./.tools/SwiftLint/swiftlint" # SwiftLint is not working properly when run inside brew install, not sure why
    xcodebuild "-project", "Screenshot Framer.xcodeproj",
               "-scheme", "Screenshot-Framer-CLI",
               "DSTROOT=build/install",
               "SYMROOT=build",
               "INSTALL_PATH=/bin",
               "install"
    bin.install "build/install/bin/Screenshot-Framer-CLI"
  end

  test do
    system "#{bin}/Screenshot-Framer-CLI"
  end
end
Patrick-Kladek commented 5 years ago

That seems like a good idea. Unfortunately I have no experience with creating a homebrew setup. Do I only have to change the url "https://github.com/flix-tech/ScreenshotFramer.git" with ours or is there more to do?

nikolaykasyanov commented 5 years ago

@Patrick-Kladek sounds about right, I'd also use a tag instead of the branch & revision combo.

nikolaykasyanov commented 5 years ago

There may also be a nicer way to disable SwiftLint.