cql 0.5.0 (new formula)
Closes #38973. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
fda4660afa
commit
91be3549a2
1 changed files with 30 additions and 0 deletions
30
Formula/cql.rb
Normal file
30
Formula/cql.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class Cql < Formula
|
||||
desc "Decentralized SQL database with blockchain features"
|
||||
homepage "https://covenantsql.io"
|
||||
url "https://github.com/CovenantSQL/CovenantSQL/archive/v0.5.0.tar.gz"
|
||||
sha256 "ebee3e8fca672d6f3d3d607e380ec7a1f3a31501e5c80b85c660f50eda7a2240"
|
||||
head "https://github.com/CovenantSQL/CovenantSQL.git"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
ENV["CQLVERSION"] = "v0.5.0"
|
||||
ENV["CGO_ENABLED"] = "1"
|
||||
mkdir_p "src/github.com/CovenantSQL"
|
||||
ldflags = "-X main.version=v0.5.0 " \
|
||||
"-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"
|
||||
end
|
||||
|
||||
test do
|
||||
testconf = testpath/"confgen"
|
||||
system bin/"cql", "generate", "-config", testconf, "-no-password", "config"
|
||||
assert_predicate testconf/"private.key", :exist?
|
||||
assert_predicate testconf/"config.yaml", :exist?
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue