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: main check when using gomod.proxy #2390

Merged
merged 4 commits into from Aug 13, 2021
Merged

fix: main check when using gomod.proxy #2390

merged 4 commits into from Aug 13, 2021

Conversation

caarlos0
Copy link
Member

we can't check for the main function in the actual proxied module, but we can at least check the code which, in theory, is the module being proxied.

this should avoid bad releases as I did for fork-cleaner, which was basically empty.

What happens now is that the gomod pipe overrides Main and Dir as before, but set the original values to UnproxiedMain and UnproxiedDir, and then the build pipe checks the main on the unproxied properties when they exist.

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@caarlos0 caarlos0 added the bug Something isn't working label Aug 11, 2021
@caarlos0 caarlos0 self-assigned this Aug 11, 2021
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 11, 2021
@vercel
Copy link

vercel bot commented Aug 11, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/goreleaser/4xTyZgG5mAQXzNVgR4kHx6tDCEDw
✅ Preview: https://goreleaser-git-proxy-main-check-goreleaser.vercel.app

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel vercel bot temporarily deployed to Preview August 11, 2021 12:33 Inactive
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel vercel bot temporarily deployed to Preview August 11, 2021 13:01 Inactive
@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #2390 (1471bd6) into master (1d90ecb) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2390      +/-   ##
==========================================
+ Coverage   82.91%   82.94%   +0.02%     
==========================================
  Files          83       83              
  Lines        6059     6067       +8     
==========================================
+ Hits         5024     5032       +8     
  Misses        887      887              
  Partials      148      148              
Impacted Files Coverage Δ
pkg/config/config.go 90.72% <ø> (ø)
internal/builders/golang/build.go 92.89% <100.00%> (+0.20%) ⬆️
internal/pipe/gomod/gomod.go 78.44% <100.00%> (+0.37%) ⬆️

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 1d90ecb...1471bd6. Read the comment docs.

@caarlos0 caarlos0 merged commit a4a96ea into master Aug 13, 2021
@caarlos0 caarlos0 deleted the proxy-main-check branch August 13, 2021 23:33
@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 Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 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.

None yet

1 participant