2019-05-20 03:34:04 +00:00
|
|
|
class Dbmate < Formula
|
|
|
|
desc "Lightweight, framework-agnostic database migration tool"
|
|
|
|
homepage "https://github.com/amacneil/dbmate"
|
2019-05-27 21:25:46 +00:00
|
|
|
url "https://github.com/amacneil/dbmate/archive/v1.6.0.tar.gz"
|
|
|
|
sha256 "b73c6edf57a125b9d5bb51d2eac0067dae6f8049d7ff9aa891b2acaa2882f4d5"
|
2019-05-20 03:34:04 +00:00
|
|
|
head "https://github.com/amacneil/dbmate.git"
|
|
|
|
|
2019-05-21 01:04:42 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "946932c1571f2ed959a588035991b70533e5d9141b5489baf78d52bcf7412541" => :mojave
|
|
|
|
sha256 "b21f89fb8c5ec25db5a8c7d12fae7e1405d0268b6cbe2d4f823a2440a6885391" => :high_sierra
|
|
|
|
sha256 "84be32d3501f2d87d77a0c843c841a1583c0a142bc287e85fb63ee900b29284c" => :sierra
|
|
|
|
end
|
|
|
|
|
2019-05-20 03:34:04 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "go", "build", "-ldflags", "-s", "-o", bin/"dbmate", "."
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/".env").write("DATABASE_URL=sqlite3:///test.sqlite3")
|
|
|
|
system bin/"dbmate", "create"
|
|
|
|
assert_predicate testpath/"test.sqlite3", :exist?, "failed to create test.sqlite3"
|
|
|
|
end
|
|
|
|
end
|