homebrew-cask/Casks/gogs.rb

23 lines
682 B
Ruby

cask 'gogs' do
version '0.11.66'
sha256 'f92e7bb780efd66ba0c714c333ca4c67152f93396644b75750da6bf413b762d5'
# github.com/gogits/gogs was verified as official when first introduced to the cask
url "https://github.com/gogits/gogs/releases/download/v#{version}/darwin_amd64.zip"
appcast 'https://github.com/gogits/gogs/releases.atom'
name 'Go Git Service'
homepage 'https://gogs.io/'
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/gogs.wrapper.sh"
binary shimscript, target: 'gogs'
preflight do
IO.write shimscript, <<~EOS
#!/bin/sh
cd '#{staged_path}/gogs' && ./gogs "$@"
EOS
end
end