github.com/goreleaser/goreleaser@v1.25.1/internal/pipe/brew/testdata/TestFullPipe/custom_block.rb.golden (about) 1 # typed: false 2 # frozen_string_literal: true 3 4 # This file was generated by GoReleaser. DO NOT EDIT. 5 class CustomBlock < Formula 6 desc "Run pipe test formula and FOO=foo_is_bar" 7 homepage "https://github.com/goreleaser" 8 version "1.0.1" 9 10 depends_on "ash" => "1.0.0" if OS.linux? 11 depends_on "bash" => "3.2.57" 12 depends_on "fish" => :optional 13 depends_on "powershell" => :optional if OS.mac? 14 depends_on "zsh" => :optional 15 16 on_macos do 17 if Hardware::CPU.intel? 18 url "https://dummyhost/download/v1.0.1/bin.tar.gz" 19 sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 20 21 def install 22 bin.install "custom_block_darwin_amd64 => custom_block" 23 end 24 end 25 if Hardware::CPU.arm? 26 url "https://dummyhost/download/v1.0.1/bin.tar.gz" 27 sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 28 29 def install 30 bin.install "custom_block_darwin_arm64 => custom_block" 31 end 32 end 33 end 34 35 on_linux do 36 if Hardware::CPU.intel? 37 url "https://dummyhost/download/v1.0.1/bin.tar.gz" 38 sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 39 40 def install 41 bin.install "custom_block_linux_amd64 => custom_block" 42 end 43 end 44 end 45 46 conflicts_with "gtk+" 47 conflicts_with "qt" 48 49 head "https://github.com/caarlos0/test.git" 50 51 def post_install 52 system "echo" 53 touch "/tmp/hi" 54 end 55 56 def caveats 57 <<~EOS 58 don't do this custom_block 59 EOS 60 end 61 62 plist_options startup: false 63 64 def plist 65 <<~EOS 66 <xml>whatever</xml> 67 EOS 68 end 69 70 service do 71 run foo/bar 72 keep_alive true 73 end 74 75 test do 76 system "true" 77 system "#{bin}/foo", "-h" 78 end 79 end