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: build dir that dont exist yet #2435

Merged
merged 1 commit into from Sep 1, 2021
Merged

fix: build dir that dont exist yet #2435

merged 1 commit into from Sep 1, 2021

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Aug 27, 2021

if the build.dir doesn't exist, ignore it while checking the go version.

IMHO, its unlikely that the before hook of a build will create a folder and set a go wrapper in there...

For now I think we can just ignore the dir if we fail to stat it.

cc/ @jorng

closes #2434

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@caarlos0 caarlos0 added the bug Something isn't working label Aug 27, 2021
@caarlos0 caarlos0 self-assigned this Aug 27, 2021
@caarlos0 caarlos0 added this to In progress in Board via automation Aug 27, 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 27, 2021
@vercel
Copy link

vercel bot commented Aug 27, 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/CDd9VcyT6LhH4fxgJJ2Jm3XrVe3b
✅ Preview: https://goreleaser-git-build-goreleaser.vercel.app

@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #2435 (f15671f) into master (70057e8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2435      +/-   ##
==========================================
+ Coverage   83.01%   83.02%   +0.01%     
==========================================
  Files          84       84              
  Lines        6165     6169       +4     
==========================================
+ Hits         5118     5122       +4     
  Misses        894      894              
  Partials      153      153              
Impacted Files Coverage Δ
internal/builders/golang/targets.go 97.19% <100.00%> (+0.10%) ⬆️

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 70057e8...f15671f. Read the comment docs.

@jorng
Copy link
Contributor

jorng commented Aug 28, 2021

Makes sense. Setting Dir during the version check more specifically for the instance that both Dir and GoBinary are set, in case GoBinary is a relative path.

That's how I hit the bug originally. I wrote a wrapper script to "natively" compile for darwin/amd64 when running on darwin/arm64 using Rosetta. The builds all failed when I had Dir+GoBinary set.

@caarlos0 caarlos0 merged commit b132d00 into master Sep 1, 2021
Board automation moved this from In progress to Done Sep 1, 2021
@caarlos0 caarlos0 deleted the build branch September 1, 2021 01:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
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
No open projects
Board
Done
Development

Successfully merging this pull request may close these issues.

[Bug]: premature go version validation breaks goreleaser flows
2 participants