JohnSundell / SwiftPlate

Easily generate cross platform Swift framework projects from the command line
MIT License
1.77k stars 88 forks source link

Homebrew support #1

Closed BalestraPatrick closed 7 years ago

BalestraPatrick commented 7 years ago

Hey! Not sure how and if it could work, but would it be possible to install SwiftPlate via Homebrew? 👍

BalestraPatrick commented 7 years ago

Update: Just realized I can run it with swift main.swift but it's not mentioned in the README. Is this a supported way to run the project? :)

JohnSundell commented 7 years ago

@BalestraPatrick Sure, you can compile & run main.swift directly, no problems! 👍 For Homebrew, someone (hint hint 😉) other than me needs to submit the formula (they state We frown on authors submitting their own work unless it is very popular. in their docs). 😇

codeOfRobin commented 7 years ago

@JohnSundell You'll have to tag and create a release (homebrew needs a URL with a zip to point to) . After that, I can submit to homebrew 🤓

JohnSundell commented 7 years ago

@codeOfRobin Done! 🚀 https://github.com/JohnSundell/SwiftPlate/releases/tag/1.0.0. Thanks for helping out 💃

codeOfRobin commented 7 years ago

Awesome! I'll have it done by tomorrow.

JohnSundell commented 7 years ago

@codeOfRobin That is amazing! Thank you so much! 👍

codeOfRobin commented 7 years ago

@JohnSundell I'll have to add a Makefile. Making a PR in a moment.

codeOfRobin commented 7 years ago

Okay, so updates.

  1. The install script is up and running, no issues there.
  2. the test part needs some work. It needs to create a directory(ideally), run swiftplate, somehow supply all the arguments needed, then run testStructure.py. I have a few ideas on how we could do this:-

@JohnSundell How hard would it be to accept a JSON file, parse it and use that to generate a project (I imagine not much, since JSONSerialization is available on both MacOS and Linux)

JohnSundell commented 7 years ago

I think adding the option of supplying SwiftPlate's options via STDIN probably makes the most sense. It would also make it easier to use it from for example CI, to be able to automate the automatic generation of projects 😅! I can work on this during the weekend if no one else picks it up.

codeOfRobin commented 7 years ago

@JohnSundell You mean like --argument-name value? That did not cross my mind. I volunteer ✋.

JohnSundell commented 7 years ago

@codeOfRobin Yeah exactly! That's awesome - all yours! 🚀

JohnSundell commented 7 years ago

We now have Homebrew support, thanks to @codeOfRobin! 🎉 Just $ brew install swiftplate 🚀