2019-04-18 01:47:54 +00:00
|
|
|
class Cql < Formula
|
|
|
|
desc "Decentralized SQL database with blockchain features"
|
|
|
|
homepage "https://covenantsql.io"
|
2019-08-09 02:02:03 +00:00
|
|
|
url "https://github.com/CovenantSQL/CovenantSQL/archive/v0.8.0.tar.gz"
|
|
|
|
sha256 "fc63d9bc296b037c8a8fd1984bc6e4156d0c73d9948dfa8654a954f904ad1f4a"
|
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-12-30 17:20:15 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "6910f358939ba05d8db050688abe4d6df42ce12801949e8be7f49743023d572f" => :catalina
|
|
|
|
sha256 "dd644eb78e0c68e04fcde376481d12ab7d5a0cfddcd844fe3529d8129fec262b" => :mojave
|
|
|
|
sha256 "623599aba9f2a656f5ee530dd367b0741b6b1e7a3e564c629adf29b5ef3a290e" => :high_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-06-25 15:28:13 +00:00
|
|
|
ENV["CQLVERSION"] = "v#{version}"
|
2019-04-18 01:47:54 +00:00
|
|
|
ENV["CGO_ENABLED"] = "1"
|
|
|
|
mkdir_p "src/github.com/CovenantSQL"
|
2019-06-25 15:28:13 +00:00
|
|
|
ldflags = "-X main.version=v#{version} " \
|
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
|