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

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