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
|
2019-05-27 21:32:39 +00:00
|
|
|
sha256 "7e8b233775e3f4916fc0a342e1dd30a5af8fe5d59ac59ab961d2957b9918e2af" => :mojave
|
|
|
|
sha256 "79784ca8ce7c443219a3c66fb4089cdda76dec37a1f0b08235d6efa59326aa33" => :high_sierra
|
|
|
|
sha256 "f23e60c78dbcd764ea0ddf42c6ad6c858edcc7046024001839c3aabbed16ece3" => :sierra
|
2019-05-21 01:04:42 +00:00
|
|
|
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
|