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

feat: allow a --output flag on goreleaser build #2701

Merged
merged 3 commits into from Feb 5, 2022
Merged

feat: allow a --output flag on goreleaser build #2701

merged 3 commits into from Feb 5, 2022

Conversation

caarlos0
Copy link
Member

closes #2685

This would add similar behavior as go build, a -o flag.

so, when you goreleaser build --single-target -o foo, it will save the binary as foo (if you have only one build config, otherwise this also needs the --id flag).

Hopefully this helps replacing some build tasks on makefiles :)

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
@caarlos0 caarlos0 added the enhancement New feature or request label Nov 25, 2021
@caarlos0 caarlos0 added this to the v1.1.0 milestone Nov 25, 2021
@caarlos0 caarlos0 self-assigned this Nov 25, 2021
@caarlos0 caarlos0 added this to In progress in Board via automation Nov 25, 2021
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 25, 2021
@caarlos0 caarlos0 requested a review from a team November 25, 2021 03:15
@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #2701 (9838b0a) into main (cbcdd41) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2701      +/-   ##
==========================================
+ Coverage   84.96%   84.98%   +0.02%     
==========================================
  Files         105      105              
  Lines        7953     7968      +15     
==========================================
+ Hits         6757     6772      +15     
  Misses        980      980              
  Partials      216      216              
Impacted Files Coverage Δ
cmd/build.go 97.93% <100.00%> (+0.23%) ⬆️

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 cbcdd41...9838b0a. Read the comment docs.

Copy link
Member

@mgrachev mgrachev left a comment

Choose a reason for hiding this comment

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

LGTM 👌

Board automation moved this from In progress to Reviewer approved Nov 25, 2021
@SuperQ
Copy link
Contributor

SuperQ commented Nov 25, 2021

I was thinking it would be better to use a config file option, so multiple build IDs could be done in one command.

@caarlos0
Copy link
Member Author

hmm, if that's the case, then yeah, it might make more sense... will do as you suggested

@SuperQ
Copy link
Contributor

SuperQ commented Nov 25, 2021

I'm also happy to help work on this.

@caarlos0 caarlos0 closed this Nov 25, 2021
Board automation moved this from Reviewer approved to Done Nov 25, 2021
@caarlos0
Copy link
Member Author

I'm also happy to help work on this.

feel free to do so if you want :)

@caarlos0 caarlos0 removed this from the v1.1.0 milestone Nov 25, 2021
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
@caarlos0 caarlos0 reopened this Dec 6, 2021
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
@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 Dec 6, 2021
@vercel vercel bot temporarily deployed to Preview December 6, 2021 02:14 Inactive
@caarlos0
Copy link
Member Author

caarlos0 commented Dec 6, 2021

@SuperQ what about this: when using --single-target, it always copies the binary to the root folder (with same name already setup on .goreleaser.yaml), and you can still rename with --output... what do you think?

@caarlos0 caarlos0 merged commit c42a2fd into main Feb 5, 2022
@caarlos0 caarlos0 deleted the build-o branch February 5, 2022 21:19
@github-actions github-actions bot added this to the v1.5.0 milestone Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
No open projects
Board
Done
Development

Successfully merging this pull request may close these issues.

Allow output template changes for single-target mode
3 participants