forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbee.rb
27 lines (23 loc) · 821 Bytes
/
bee.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Bee < Formula
desc "Tool for managing database changes"
homepage "https://github.com/bluesoft/bee"
url "https://github.com/bluesoft/bee/releases/download/1.71/bee-1.71.zip"
sha256 "d6b6bede523447101fe9f8d2b73c6c7e2c980f80aee60152ffdf784b430f92f3"
bottle :unneeded
depends_on :java => "1.8"
def install
rm_rf Dir["bin/*.bat"]
libexec.install Dir["*"]
(bin/"bee").write_env_script libexec/"bin/bee", Language::Java.java_home_env("1.8")
end
test do
(testpath/"bee.properties").write <<~EOS
test-database.driver=com.mysql.jdbc.Driver
test-database.url=jdbc:mysql://127.0.0.1/test-database
test-database.user=root
test-database.password=
EOS
(testpath/"bee").mkpath
system bin/"bee", "-d", testpath/"bee", "dbchange:create", "new-file"
end
end