Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Distribute in the homebrew core #1

@sungwoncho

Description

@sungwoncho
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions