-
-
Notifications
You must be signed in to change notification settings - Fork 1k
multiple builds #267
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
multiple builds #267
Conversation
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
+ Coverage 96.21% 96.23% +0.01%
==========================================
Files 21 21
Lines 634 690 +56
==========================================
+ Hits 610 664 +54
- Misses 14 15 +1
- Partials 10 11 +1
Continue to review full report at Codecov.
|
pipeline/brew/brew.go
Outdated
Binary: ctx.Config.Build.Binary, | ||
Caveats: ctx.Config.Brew.Caveats, | ||
File: file, | ||
Format: ctx.Config.Archive.Format, // TODO this can be broken by format_overrides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was finally fixed on a3c1e2b
@jorinvo @client9 can you guys review? It should work now! BTW: I think it is a good idea to add a pre-step to remove the What do you guys think? |
Thanks for working on this! I will check it out. |
- darwin | ||
- linux | ||
goarch: | ||
- amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the legacy build
syntax also supported? If so maybe it's worth mentioning that it's also still supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is supported but is "deprecated"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know goreleaser well to provide more constructive feedback, so I left a couple of trivial comments.
t.Run("post-hook", func(t *testing.T) { | ||
ctx.Config.Build.Hooks.Post = "exit 1" | ||
ctx.Config.Builds[0].Hooks.Post = "exit 1" | ||
assert.Error(Pipe{}.Run(ctx)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again if the legacy Build
syntax is supported, you may want to leave the unittests for those too to ensure backward compatibility is preserved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, this is being tested already!
https://github.com/goreleaser/goreleaser/blob/master/pipeline/defaults/defaults_test.go#L75
the single build will always become an item of the builds list :)
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. |
Now we can have several build, several binaries even, using the
builds
key on thegoreleaser.yml
file!It is backwards compatible with the previous
build
field, and in the end it will releases a single archive per target (goos + goarch + goarm) and also a single brew formula, with all binaries of that given target inside.It required some rework in the code, but, after a few hours, I was able to tackle it down and also fix some unknown/unreported bugs on the way! ( #271 )
I tested this PR on a test repo:
Everything looks good: non darwin/amd64 builds where ignored by the brew formulae, deb files are working, etc...
FWIW, here are snapshots of the latest commit:
goreleaser_Darwin_i386.tar.gz
goreleaser_Darwin_x86_64.tar.gz
goreleaser_Linux_arm64.tar.gz
goreleaser_Linux_armv6.tar.gz
goreleaser_Linux_i386.tar.gz
goreleaser_Linux_x86_64.tar.gz
goreleaser_checksums.txt
goreleaser_Windows_i386.zip
goreleaser_Windows_x86_64.zip
closes #259
refs #49 #228