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

Distribute in the homebrew core #1

Open
sungwoncho opened this issue Sep 8, 2018 · 0 comments
Open

Distribute in the homebrew core #1

sungwoncho opened this issue Sep 8, 2018 · 0 comments

Comments

@sungwoncho
Copy link
Member

  • Make a formula that builds Dnote from source
  • Merge the formula to the homebrew core

IDEA

class Dnote < Formula
  desc "Capture your learning without leaving the command line"
  homepage "https://dnote.io"
  url "https://github.com/dnote/cli/releases/download/v0.4.2/dnote_0.4.2_darwin_amd64.tar.gz"
  version "0.4.2"
  sha256 "d78871314d52dc48b18200fff896de63db55077ef2ce4e5f407ab92a72873c00"

  depends_on "go" => :build
  depends_on "dep" => :build

  def install
    ENV["GOPATH"] = buildpath

    (buildpath/"src/github.com/dnote/cli").install buildpath.children
    cd "src/github.com/dnote/cli" do
      system "dep", "ensure"
      system "go", "build", "-ldflags", "-X main.apiEndpoint=https://api.dnote.io", "-o", bin/"dnote"
    end
  end

  test do
    system "${bin}/dnote --version"
  end
end
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