homebrew-cask/Casks/gogs.rb

24 lines
779 B
Ruby

cask 'gogs' do
version '0.10.18'
sha256 '2cff63d4ee55866325f4c581721825a9f5204b8dcae712179a87cd2fe1c9355d'
# 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: '008541d957ba25e33febe14263d4ae20ee32b25c541b360d7639328c2c6b8dba'
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