github.com/goreleaser/goreleaser@v1.25.1/internal/pipe/brew/testdata/TestFullPipe/open_pr.rb.golden (about)

     1  # typed: false
     2  # frozen_string_literal: true
     3  
     4  # This file was generated by GoReleaser. DO NOT EDIT.
     5  class OpenPr < 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 "open_pr_darwin_amd64 => open_pr"
    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 "open_pr_darwin_arm64 => open_pr"
    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 "open_pr_linux_amd64 => open_pr"
    42        end
    43      end
    44    end
    45  
    46    conflicts_with "gtk+"
    47    conflicts_with "qt"
    48  
    49    def post_install
    50      system "echo"
    51      touch "/tmp/hi"
    52    end
    53  
    54    def caveats
    55      <<~EOS
    56        don't do this open_pr
    57      EOS
    58    end
    59  
    60    plist_options startup: false
    61  
    62    def plist
    63      <<~EOS
    64        <xml>whatever</xml>
    65      EOS
    66    end
    67  
    68    service do
    69      run foo/bar
    70      keep_alive true
    71    end
    72  
    73    test do
    74      system "true"
    75      system "#{bin}/foo", "-h"
    76    end
    77  end