2017-01-21 11:33:49 +08:00
|
|
|
cask 'eventstore' do
|
2019-11-15 23:50:03 +08:00
|
|
|
version '5.0.5'
|
|
|
|
sha256 '4e0a88817f6243c3f0ef319520a628c7433af5338331f9ad45ca6192e9f8a219'
|
2017-01-21 11:33:49 +08:00
|
|
|
|
2019-02-20 08:11:19 +08:00
|
|
|
url "https://eventstore.org/downloads/macos/EventStore-OSS-MacOS-macOS-v#{version}.tar.gz"
|
2017-01-21 11:33:49 +08:00
|
|
|
name 'Event Store'
|
2018-01-13 13:09:46 +08:00
|
|
|
homepage 'https://eventstore.org/'
|
2017-01-21 11:33:49 +08:00
|
|
|
|
2019-02-20 08:11:19 +08:00
|
|
|
binary "EventStore-OSS-MacOS-macOS-v#{version}/eventstore"
|
|
|
|
binary "EventStore-OSS-MacOS-macOS-v#{version}/eventstore-testclient"
|
2017-01-21 11:33:49 +08:00
|
|
|
|
2018-05-22 03:21:38 +08:00
|
|
|
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
|
2019-02-20 08:11:19 +08:00
|
|
|
eventstore_shimscript = "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/eventstore"
|
|
|
|
testclient_shimscript = "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/eventstore-testclient"
|
2017-01-21 11:33:49 +08:00
|
|
|
|
|
|
|
preflight do
|
2017-10-22 23:36:29 +08:00
|
|
|
IO.write eventstore_shimscript, <<~EOS
|
2017-01-21 11:33:49 +08:00
|
|
|
#!/bin/sh
|
2019-02-20 08:11:19 +08:00
|
|
|
cd "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}"
|
|
|
|
exec "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/run-node.sh" "$@"
|
2017-01-21 11:33:49 +08:00
|
|
|
EOS
|
|
|
|
|
2017-10-22 23:36:29 +08:00
|
|
|
IO.write testclient_shimscript, <<~EOS
|
2017-01-21 11:33:49 +08:00
|
|
|
#!/bin/sh
|
2019-02-20 08:11:19 +08:00
|
|
|
exec "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/testclient" "$@"
|
2017-01-21 11:33:49 +08:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|