Skip to content

Commit

Permalink
Merge pull request #1 from algobot76/add-devstream
Browse files Browse the repository at this point in the history
ci: make it possible to install dtm using homebrew
  • Loading branch information
IronCore864 authored Mar 29, 2022
2 parents 5389eea + b4c7bab commit 2faa8a5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
28 changes: 28 additions & 0 deletions Formula/dev-stream.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class DevStream < Formula
desc "Open-source DevOps toolchain manager (DTM)"
homepage "https://github.com/merico-dev/stream"
url "https://github.com/merico-dev/stream/archive/refs/tags/v0.3.0.tar.gz"
sha256 "3223ff4ea46626d6849831ad9abfa6f67699731fd927fe477ab945b3ab9424eb"
license "Apache-2.0"

depends_on "go" => :build

def install
goos = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOOS").chomp
goarch = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOARCH").chomp
ENV["GOPATH"] = buildpath
ENV["GO111MODULE"] = "auto"
mkdir_p buildpath/"bin"
ENV.prepend_path "PATH", buildpath/"bin"
(buildpath/"src/github.com/merico-dev/stream").install buildpath.children
cd "src/github.com/merico-dev/stream" do
system "make", "build-core"
mv "dtm-#{goos}-#{goarch}", "dtm"
bin.install "dtm"
end
end

test do
assert_match version.to_s, shell_output("#{bin}/dtm version")
end
end
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Devstream-io Devstream

## How do I install these formulae?
## How do I install `dtm`?

`brew install devstream-io/devstream/dtm`
1. `brew tap devstream-io/devstream`
2. `brew install dev-stream`

## Documentation

Expand Down

0 comments on commit 2faa8a5

Please sign in to comment.