homebrew-cask/Casks/eventstore.rb

29 lines
1.0 KiB
Ruby

cask "eventstore" do
version "5.0.8"
sha256 "707e7fda884b9a0c03238f5e56d4927dfb85deda4402f5690c505a839b5159c4"
url "https://eventstore.org/downloads/macos/EventStore-OSS-MacOS-macOS-v#{version}.tar.gz"
name "Event Store"
homepage "https://eventstore.org/"
binary "EventStore-OSS-MacOS-macOS-v#{version}/eventstore"
binary "EventStore-OSS-MacOS-macOS-v#{version}/eventstore-testclient"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
eventstore_shimscript = "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/eventstore"
testclient_shimscript = "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/eventstore-testclient"
preflight do
IO.write eventstore_shimscript, <<~EOS
#!/bin/sh
cd "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}"
exec "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/run-node.sh" "$@"
EOS
IO.write testclient_shimscript, <<~EOS
#!/bin/sh
exec "#{staged_path}/EventStore-OSS-MacOS-macOS-v#{version}/testclient" "$@"
EOS
end
end