2019-04-18 01:47:54 +00:00
|
|
|
class Cql < Formula
|
|
|
|
desc "Decentralized SQL database with blockchain features"
|
|
|
|
homepage "https://covenantsql.io"
|
2019-05-15 14:21:17 +00:00
|
|
|
url "https://github.com/CovenantSQL/CovenantSQL/archive/v0.6.0.tar.gz"
|
|
|
|
sha256 "2e14e9f44940c0cc3d861ebd7430a962e08c91b3569d85cc6be7460ebe3215aa"
|
2019-04-18 01:47:54 +00:00
|
|
|
head "https://github.com/CovenantSQL/CovenantSQL.git"
|
|
|
|
|
2019-04-18 10:48:26 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-05-21 07:44:21 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "086bb25611e44b4be4be46a5c24aed455bea5056aac6e57433ab8271eaa0e3e5" => :mojave
|
|
|
|
sha256 "8e474e34760146fbda7a5ccfdd860f9e2af675dc215968b4d4e7f638e73535fb" => :high_sierra
|
|
|
|
sha256 "7b98338722de466394c51433c72860cd1abc1d81af4b4ef217364b887df70006" => :sierra
|
2019-04-18 10:48:26 +00:00
|
|
|
end
|
|
|
|
|
2019-04-18 01:47:54 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
2019-05-15 14:21:17 +00:00
|
|
|
ENV["CQLVERSION"] = "v0.6.0"
|
2019-04-18 01:47:54 +00:00
|
|
|
ENV["CGO_ENABLED"] = "1"
|
|
|
|
mkdir_p "src/github.com/CovenantSQL"
|
2019-05-15 14:21:17 +00:00
|
|
|
ldflags = "-X main.version=v0.6.0 " \
|
2019-04-18 01:47:54 +00:00
|
|
|
"-X github.com/CovenantSQL/CovenantSQL/conf.RoleTag=C " \
|
|
|
|
"-X github.com/CovenantSQL/CovenantSQL/utils/log.SimpleLog=Y"
|
|
|
|
ln_s buildpath, "src/github.com/CovenantSQL/CovenantSQL"
|
|
|
|
system "go", "build", "-tags", "sqlite_omit_load_extension",
|
|
|
|
"-ldflags", ldflags, "-o", "bin/cql", "github.com/CovenantSQL/CovenantSQL/cmd/cql"
|
|
|
|
bin.install "bin/cql"
|
2019-05-21 01:58:39 +00:00
|
|
|
bash_completion.install "bin/completion/cql-completion.bash"
|
|
|
|
zsh_completion.install "bin/completion/_cql"
|
2019-04-18 01:47:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
testconf = testpath/"confgen"
|
2019-05-21 01:58:39 +00:00
|
|
|
system bin/"cql", "generate", testconf
|
2019-04-18 01:47:54 +00:00
|
|
|
assert_predicate testconf/"private.key", :exist?
|
|
|
|
assert_predicate testconf/"config.yaml", :exist?
|
|
|
|
end
|
|
|
|
end
|