Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support template in the install section for brews #3587

Closed
2 tasks done
cpanato opened this issue Nov 23, 2022 · 3 comments · Fixed by #3593
Closed
2 tasks done

support template in the install section for brews #3587

cpanato opened this issue Nov 23, 2022 · 3 comments · Fixed by #3593
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cpanato
Copy link
Contributor

cpanato commented Nov 23, 2022

Is your feature request related to a problem? Please describe.

support the templating in the install section for the brew

we generate binaries in the following format: binaryName_{{ .Os }}_{{ .Arch }}

and when creating the brew formula to users to install we would like to rename the binary in the install time to just binaryName

so in the brew syntax it is

bin.install "binaryName_{{ .Os }}_{{ .Arch }}" => "binaryName"

however when you add this in the gorelreaser config

...
brews:
...
  install: |
    bin.install "binaryName_{{ .Os }}_{{ .Arch }}" => "binaryName"

we receive an error

error=template: tmpl:16:33: executing "tmpl" at <.Os>: map has no entry for key "Os"

Describe the solution you'd like

the install section in the brew should accept template variables

Describe alternatives you've considered

n/a

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

thank you

@cpanato cpanato added enhancement New feature or request triage Issue pending triage by one of the maintainers labels Nov 23, 2022
@caarlos0 caarlos0 added this to the v1.14.0 milestone Nov 24, 2022
@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Nov 24, 2022
@caarlos0
Copy link
Member

@cpanato please check #3593

@cpanato
Copy link
Contributor Author

cpanato commented Nov 25, 2022

@caarlos0 please let me know when you release it :)

@caarlos0
Copy link
Member

@cpanato probably middle december, I plan to get nightlies for goreleaser oss as well, so you can use those meanwhile if you want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants