Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Homebrew Formula #27

Open
qeude opened this issue Jun 9, 2021 · 0 comments
Open

Adding Homebrew Formula #27

qeude opened this issue Jun 9, 2021 · 0 comments

Comments

@qeude
Copy link

qeude commented Jun 9, 2021

Hi John,

Thanks for this awesome tool ! Would love to be able to install it throught the brew command.
Any chance that you would either create a tap Formula or adding it to homebrew-core ?

The playground.rb would look similar to the following considering you would create a release.

class Playground < Formula
  desc "Instantly create Swift playgrounds from the command line"
  homepage "https://github.com/JohnSundell/Playground"
  url "https://github.com/JohnSundell/Playground/archive/refs/tags/1.0.0.tar.gz"
  sha256 "<SHOULD ADD THE RIGHT SHA256 HERE>"
  license "MIT"


  def install
    system "swift", "build",
        "--configuration", "release",
        "--disable-sandbox"    
        
    bin.install '.build/release/Playground'
  end

  test do
    system "#{bin}/playground"
  end
end

The formula could also be updated using a Github Actions or so for each release 🤷🏼‍♂️
In case that you want to do a Tap Formula, you might be the only one being able to create it. And if you want to add it to homebrew-core, you can just create the release then I can create the pull request with to file above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant