github.com/goreleaser/goreleaser@v1.25.1/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 "ash" => "1.0.0" if OS.linux?
    12    depends_on "bash" => "3.2.57"
    13    depends_on "fish" => :optional
    14    depends_on "powershell" => :optional if OS.mac?
    15    depends_on "zsh" => :optional
    16  
    17    on_macos do
    18      if Hardware::CPU.intel?
    19        url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: CustomDownloadStrategy
    20        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    21  
    22        def install
    23          bin.install "custom_require_darwin_amd64 => custom_require"
    24        end
    25      end
    26      if Hardware::CPU.arm?
    27        url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: CustomDownloadStrategy
    28        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    29  
    30        def install
    31          bin.install "custom_require_darwin_arm64 => custom_require"
    32        end
    33      end
    34    end
    35  
    36    on_linux do
    37      if Hardware::CPU.intel?
    38        url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: CustomDownloadStrategy
    39        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    40  
    41        def install
    42          bin.install "custom_require_linux_amd64 => custom_require"
    43        end
    44      end
    45    end
    46  
    47    conflicts_with "gtk+"
    48    conflicts_with "qt"
    49  
    50    def post_install
    51      system "echo"
    52      touch "/tmp/hi"
    53    end
    54  
    55    def caveats
    56      <<~EOS
    57        don't do this custom_require
    58      EOS
    59    end
    60  
    61    plist_options startup: false
    62  
    63    def plist
    64      <<~EOS
    65        <xml>whatever</xml>
    66      EOS
    67    end
    68  
    69    service do
    70      run foo/bar
    71      keep_alive true
    72    end
    73  
    74    test do
    75      system "true"
    76      system "#{bin}/foo", "-h"
    77    end
    78  end