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

fix: Fix destinations for files containing matchers when globbing is disabled. #410

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

rtpt-erikgeiser
Copy link
Contributor

This PR fixes a bug where file sources containing matchers result in the files being created inside folders of the same name as the file when globbing is disabled.

Example:

src: foo/{bar}/config.json
dst: /etc/config.json

resulted in this:

src: foo/{bar}/config.json
dst: /etc/config.json/config.json

when it should have actually just remain unchanged.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 1, 2021
@vercel vercel bot temporarily deployed to Preview December 1, 2021 09:16 Inactive
@vercel vercel bot temporarily deployed to Preview December 1, 2021 09:44 Inactive
@vercel vercel bot temporarily deployed to Preview December 1, 2021 09:57 Inactive
@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #410 (29c4c11) into main (9570f52) will increase coverage by 0.05%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
+ Coverage   66.19%   66.25%   +0.05%     
==========================================
  Files          15       15              
  Lines        1855     1855              
==========================================
+ Hits         1228     1229       +1     
  Misses        488      488              
+ Partials      139      138       -1     
Impacted Files Coverage Δ
internal/glob/glob.go 83.60% <90.00%> (+2.90%) ⬆️
files/files.go 91.05% <100.00%> (-0.29%) ⬇️

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 9570f52...29c4c11. Read the comment docs.

@rtpt-erikgeiser
Copy link
Contributor Author

I have no idea why, but the Windows CI task fails due to missing gcc. I don't think that's related to this RP.

@caarlos0 caarlos0 added this to the 2.11.0 milestone Dec 1, 2021
Copy link
Contributor

@djgilcrease djgilcrease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@caarlos0 caarlos0 merged commit 206d797 into goreleaser:main Dec 1, 2021
@caarlos0
Copy link
Member

caarlos0 commented Dec 1, 2021

nice, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants