Skip to content

Commit

Permalink
fix: Use squiggly heredocs in Homebrew formulae
Browse files Browse the repository at this point in the history
Homebrew now warns that <<-EOS.undent is deprecated.
  • Loading branch information
elyscape authored and caarlos0 committed Apr 5, 2018
1 parent d643672 commit 75afc6b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pipeline/brew/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const formulaTemplate = `class {{ .Name }} < Formula
{{- with .Caveats }}
def caveats; <<-EOS.undent
def caveats; <<~EOS
{{- range $index, $element := . }}
{{ . -}}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion pipeline/brew/testdata/build_from_source.rb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BuildFromSource < Formula
bin.install "foo"
end

def caveats; <<-EOS.undent
def caveats; <<~EOS
don't do this
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/brew/testdata/custom_download_strategy.rb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CustomDownloadStrategy < Formula
bin.install "foo"
end

def caveats; <<-EOS.undent
def caveats; <<~EOS
don't do this
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/brew/testdata/default.rb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Default < Formula
bin.install "foo"
end

def caveats; <<-EOS.undent
def caveats; <<~EOS
don't do this
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/brew/testdata/github_enterprise_url.rb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class GithubEnterpriseUrl < Formula
bin.install "foo"
end

def caveats; <<-EOS.undent
def caveats; <<~EOS
don't do this
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/brew/testdata/test.rb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Test < Formula
another install script
end

def caveats; <<-EOS.undent
def caveats; <<~EOS
Here are some caveats
EOS
end
Expand Down

0 comments on commit 75afc6b

Please sign in to comment.