Commit 66c968c3 authored by Chris Molozian's avatar Chris Molozian
Browse files

Update Homebrew formula for stable builds. (#4)

parent 1a2402b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Have a look at our [documentation](https://heroiclabs.com/docs/start-server/) fo
To start a server locally and bind it to all network interfaces once it's installed and on your path - `nakama`. The server output will show how it's been configured by default.

```
$ nakama
$> nakama
[I] Nakama starting at=$$now$$
[I] Node name=nakama-97f4 version=$$version$$
[I] Data directory path=$$datadir$$
+26 −17
Original line number Diff line number Diff line
@@ -16,19 +16,24 @@

require "language/go"

# TODO(novabyte) update this formula to support tarball builds as well
class Nakama < Formula
  desc "Distributed server for social and realtime games and apps."
  homepage "https://heroiclabs.com"
  url  "https://github.com/heroiclabs/nakama.git", :tag => "0.10.0"
  url "https://github.com/heroiclabs/nakama/releases/download/v0.11.0/nakama-0.11.0-darwin-amd64.tar.gz"
  sha256 "c9b83743ef42f095d7483b4a32e0b19c68f457a6aec417218efb125bf1152886"
  version "0.11.0"

  head "https://github.com/heroiclabs/nakama.git"

  if build.head?
    depends_on "glide" => :build
    depends_on "go" => :build
    depends_on "node" => :build
    depends_on "protobuf" => :build
  end

  def install
    if build.head?
      ENV["GOPATH"] = buildpath
      ENV["GOBIN"]  = buildpath/"bin"
      ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
@@ -39,13 +44,17 @@ class Nakama < Formula
        system "make", "gettools", "nakama"
        bin.install "build/dev/nakama" => "nakama"
      end
    else
      bin.install "nakama"
      prefix.install "README.md", "CHANGELOG.md", "LICENSE"
    end
  end

  def caveats
    <<-EOS.undent
    You will need to install cockroachdb as the database.
    Start the nakama server:
        nakama --dsns "root@localhost:26257"
    You can start a nakama server with:
        nakama
    EOS
  end