github.com/windmeup/goreleaser@v1.21.95/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 "bash" => "3.2.57"
    11    depends_on "fish" => :optional
    12    depends_on "zsh" => :optional
    13  
    14    on_macos do
    15      if Hardware::CPU.intel?
    16        url "https://dummyhost/download/v1.0.1/bin.tar.gz"
    17        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    18  
    19        def install
    20          bin.install "custom_block_darwin_amd64 => custom_block"
    21        end
    22      end
    23      if Hardware::CPU.arm?
    24        url "https://dummyhost/download/v1.0.1/bin.tar.gz"
    25        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    26  
    27        def install
    28          bin.install "custom_block_darwin_arm64 => custom_block"
    29        end
    30      end
    31    end
    32  
    33    on_linux do
    34      if Hardware::CPU.intel?
    35        url "https://dummyhost/download/v1.0.1/bin.tar.gz"
    36        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    37  
    38        def install
    39          bin.install "custom_block_linux_amd64 => custom_block"
    40        end
    41      end
    42    end
    43  
    44    conflicts_with "gtk+"
    45    conflicts_with "qt"
    46  
    47    head "https://github.com/caarlos0/test.git"
    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 custom_block
    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