Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Create a proper installation channel for people. #11

Closed
owensd opened this issue Jul 7, 2015 · 4 comments
Closed

Create a proper installation channel for people. #11

owensd opened this issue Jul 7, 2015 · 4 comments
Milestone

Comments

@owensd
Copy link
Owner

owensd commented Jul 7, 2015

Maybe add it to homebrew or just have a simple script that can be run.

@owensd owensd added this to the v0.3.0 milestone Jul 7, 2015
@keith
Copy link

keith commented Jul 7, 2015

Here's a first draft of a homebrew formula:

class Apous < Formula
  version "0.1.2"
  desc "Apous is a simple tool that allows for easier authoring of Swift scripts."
  homepage "https://github.com/owensd/apous"
  url "https://github.com/owensd/apous/releases/download/v0.1.2/apous"
  sha256 "3f517ecfe1e7ea32751586bb474acb4a4988029deb12b90b3b91ea9e2e3aa229"

  depends_on :xcode

  def install
    system "chmod +x apous"
    bin.install "apous"
  end

  test do
    (testpath/"test.swift").write <<-EOS.undent
      println("Hello World")
    EOS

    require "open3"
    Open3.popen3("#{bin}/apous", "test.swift") do |_, stdout, _|
      assert_equal "Hello World", stdout.read.strip
    end
  end
end

In the future you should probably zip the release so we can remove the chmod command and generate the sha256 before uploading it.

@owensd
Copy link
Owner Author

owensd commented Jul 7, 2015

This has been added with change: adcd7c5. I'll post the fork to homebrew for the forumla support soon.

@owensd owensd closed this as completed Jul 7, 2015
@keith
Copy link

keith commented Jul 7, 2015

Awesome thanks!

@owensd
Copy link
Owner Author

owensd commented Jul 7, 2015

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

No branches or pull requests

2 participants