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

feat: add url_template in brew section #735

Merged
merged 1 commit into from
Jul 26, 2018
Merged

feat: add url_template in brew section #735

merged 1 commit into from
Jul 26, 2018

Conversation

mgrachev
Copy link
Member

Hi there!

goreleaser can publish archives to s3, but can't use s3-links in brew formulas. This solution fixes that.

@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

Merging #735 into master will decrease coverage by 0.78%.
The diff coverage is 40.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #735      +/-   ##
==========================================
- Coverage   88.95%   88.17%   -0.79%     
==========================================
  Files          45       45              
  Lines        2082     2105      +23     
==========================================
+ Hits         1852     1856       +4     
- Misses        188      205      +17     
- Partials       42       44       +2
Impacted Files Coverage Δ
config/config.go 100% <ø> (ø) ⬆️
pipeline/brew/brew.go 80.41% <40.74%> (-9.59%) ⬇️
pipeline/archive/archive.go 88.77% <0%> (-3.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9154294...4dcc1ac. Read the comment docs.

@caarlos0
Copy link
Member

Maybe it would be better to add a url_template field?

Then, it would work for other things as well (e.g.: http upload pipe).

What do you think?

@caarlos0 caarlos0 added the enhancement New feature or request label Jul 24, 2018
@mgrachev
Copy link
Member Author

mgrachev commented Jul 24, 2018

@caarlos0 I agree with you. url_template would be better, but I can't imagine how it can look like. Can you give me an example of use url_template for github and s3?

@mgrachev
Copy link
Member Author

mgrachev commented Jul 25, 2018

@caarlos0 I've done. Please, review.

@caarlos0
Copy link
Member

Hi, sorry for the delay... I don't think we need to add those fields into the tmpl package, the user could just write the url template, eg. http://github.mycompany.com/foo/bar/releases/{{.Tag}}/etc (and we have the default github url as default so it doesn't break anything). S3 users could also write the URL the way they need, and people using other upload strategies could do the same...

tmpl is supposed to be generic for a lot of places...

@mgrachev
Copy link
Member Author

@caarlos0 Done.

internal/tmpl/tmpl.go Outdated Show resolved Hide resolved
@caarlos0
Copy link
Member

Just a small comment, and then we're good.

The build failure you can fix by adding a version to the context being used on the test failing - or you can leave it for me and I fix it later :)

Thanks for the PR 🚀

@mgrachev
Copy link
Member Author

@caarlos0 Done. Ready for review.

@caarlos0
Copy link
Member

Thanks @mgrachev !

@caarlos0 caarlos0 merged commit 36bb63f into goreleaser:master Jul 26, 2018
@mgrachev mgrachev deleted the feature/use-s3-link-in-brew branch July 26, 2018 13:58
@mgrachev mgrachev changed the title feat: add s3 as an option to use in a brew formula feat: add url_template in brew section Jul 26, 2018
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants