-
Notifications
You must be signed in to change notification settings - Fork 1
/
qor.rb
23 lines (20 loc) · 779 Bytes
/
qor.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Qor < Formula
desc "Cli v2 (using Go)"
homepage "https://github.com/Qordobacode/Cli-v2"
url "https://github.com/Qordobacode/Cli-v2/archive/v0.7.2.tar.gz"
sha256 "1a78c899aaf27b2146cbb33ed3a738bd14242e129be7d59612123779a299a2c9"
head "https://github.com/Qordobacode/Cli-v2.git"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
src = buildpath/"src/github.com/qordobacode/cli-v2"
src.install buildpath.children
src.cd do
system "go", "build", "-mod", "vendor", "-ldflags", "\"-w -s -X github.com/qordobacode/cli-v2/cmd/version.version=0.7.2\"", "-o", "#{bin}/qor"
prefix.install_metafiles
end
end
test do
assert_match "Qordoba Cli v4.0", shell_output("#{bin}/qor --version")
end
end