github.com/windmeup/goreleaser@v1.21.95/internal/pipe/brew/testdata/TestFullPipe/custom_download_strategy.rb.golden (about)

     1  # typed: false
     2  # frozen_string_literal: true
     3  
     4  # This file was generated by GoReleaser. DO NOT EDIT.
     5  class CustomDownloadStrategy < 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", using: GitHubPrivateRepositoryReleaseDownloadStrategy
    17        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    18  
    19        def install
    20          bin.install "custom_download_strategy_darwin_amd64 => custom_download_strategy"
    21        end
    22      end
    23      if Hardware::CPU.arm?
    24        url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: GitHubPrivateRepositoryReleaseDownloadStrategy
    25        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    26  
    27        def install
    28          bin.install "custom_download_strategy_darwin_arm64 => custom_download_strategy"
    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", using: GitHubPrivateRepositoryReleaseDownloadStrategy
    36        sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    37  
    38        def install
    39          bin.install "custom_download_strategy_linux_amd64 => custom_download_strategy"
    40        end
    41      end
    42    end
    43  
    44    conflicts_with "gtk+"
    45    conflicts_with "qt"
    46  
    47    def post_install
    48      system "echo"
    49      touch "/tmp/hi"
    50    end
    51  
    52    def caveats
    53      <<~EOS
    54        don't do this custom_download_strategy
    55      EOS
    56    end
    57  
    58    plist_options startup: false
    59  
    60    def plist
    61      <<~EOS
    62        <xml>whatever</xml>
    63      EOS
    64    end
    65  
    66    service do
    67      run foo/bar
    68      keep_alive true
    69    end
    70  
    71    test do
    72      system "true"
    73      system "#{bin}/foo", "-h"
    74    end
    75  end