Skip to content

Conversation

Ansurfen
Copy link
Contributor

This PR fixes two issues with the goreleaser init command when modifying .gitignore files:

  1. When a .gitignore file contains CRLF line endings, the command would incorrectly add duplicate dist/ entries
  2. When a .gitignore file doesn't end with a newline, the new entries would be appended on the same line, causing incorrect formatting

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 15, 2025
@caarlos0 caarlos0 added the bug Something isn't working label May 19, 2025
@caarlos0
Copy link
Member

This looks good, thanks!

Gonna wait for CI and merge if good :)

Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.92%. Comparing base (564cdb8) to head (09d53d3).

Files with missing lines Patch % Lines
cmd/init.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5775      +/-   ##
==========================================
- Coverage   82.93%   82.92%   -0.02%     
==========================================
  Files         161      161              
  Lines       15925    15932       +7     
==========================================
+ Hits        13207    13211       +4     
- Misses       2144     2146       +2     
- Partials      574      575       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 19, 2025
@caarlos0 caarlos0 merged commit 43bc15e into goreleaser:main May 19, 2025
9 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants