homebrew-cask/Casks/gogs.rb

24 lines
778 B
Ruby

cask 'gogs' do
version '0.10.8'
sha256 '183bf709297231b5ca9490fa385f97e3ab9afd59ddeffe972d50bade68e1e20b'
# 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',
checkpoint: '26caa92a196a2773f29c439c259d45bb72150c7be8c62fab0dbcd28982cacf7b'
name 'Go Git Service'
homepage 'https://gogs.io/'
# shim script (https://github.com/caskroom/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/gogs.wrapper.sh"
binary shimscript, target: 'gogs'
preflight do
IO.write shimscript, <<-EOS.undent
#!/bin/sh
cd '#{staged_path}/gogs' && ./gogs "$@"
EOS
end
end