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

     1  # typed: false
     2  # frozen_string_literal: true
     3  
     4  # This file was generated by GoReleaser. DO NOT EDIT.
     5  class WithManyHeaders < 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          headers: [
    20            "Accept: application/octet-stream",
    21            "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}"
    22          ]
    23        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    24  
    25        def install
    26          bin.install "with_many_headers_darwin_amd64 => with_many_headers"
    27        end
    28      end
    29      if Hardware::CPU.arm?
    30        url "https://dummyhost/download/v1.0.1/bin.tar.gz",
    31          headers: [
    32            "Accept: application/octet-stream",
    33            "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}"
    34          ]
    35        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    36  
    37        def install
    38          bin.install "with_many_headers_darwin_arm64 => with_many_headers"
    39        end
    40      end
    41    end
    42  
    43    on_linux do
    44      if Hardware::CPU.intel?
    45        url "https://dummyhost/download/v1.0.1/bin.tar.gz",
    46          headers: [
    47              "Accept: application/octet-stream",
    48              "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}"
    49          ]
    50        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    51  
    52        def install
    53          bin.install "with_many_headers_linux_amd64 => with_many_headers"
    54        end
    55      end
    56    end
    57  
    58    conflicts_with "gtk+"
    59    conflicts_with "qt"
    60  
    61    def post_install
    62      system "echo"
    63      touch "/tmp/hi"
    64    end
    65  
    66    def caveats
    67      <<~EOS
    68        don't do this with_many_headers
    69      EOS
    70    end
    71  
    72    plist_options startup: false
    73  
    74    def plist
    75      <<~EOS
    76        <xml>whatever</xml>
    77      EOS
    78    end
    79  
    80    service do
    81      run foo/bar
    82      keep_alive true
    83    end
    84  
    85    test do
    86      system "true"
    87      system "#{bin}/foo", "-h"
    88    end
    89  end