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