1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
Rob Prentiss 013bd69126
fix: run 'go version' command in build.Dir (#2411)
Currently, the 'goVersion' function is run without any directory set.
This is problematic when a build uses the 'dir' config in combination
with the 'gobinary' config. When 'gobinary' is a relative path (like a
script in the current repository), goVersion silently fails, returning
an empty string.

This commit refactors 'goVersion' to execute the command with '.Dir' set
to the 'build.Dir', in addition to now returning an error, so that
issues may be bubbled up in the build log, rather than silently failing.

It also adds a new helper function to facilitate running 'goVersion' by
creating a temporary executable that outputs a given 'version' string.
This function is only currently used by 'TestWithDefaults'.

Co-authored-by: Rob Prentiss <prentiss@apple.com>
2021-08-21 10:56:54 -03:00
2021-07-29 09:49:25 -03:00
2021-07-24 21:21:22 -03:00
2021-08-16 23:00:56 -03:00
2021-04-25 02:02:31 +00:00
2021-05-26 22:23:52 +00:00
2021-05-25 16:49:49 -03:00
2020-03-31 10:04:55 -03:00
2021-07-24 00:29:25 -03:00
2021-07-24 00:29:25 -03:00
2021-07-24 21:21:22 -03:00
2021-06-26 21:52:27 +00:00

GoReleaser Logo

GoReleaser

Deliver Go binaries as fast and easily as possible.


GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. We appreciate your contribution. Please refer to our contributing guidelines for further information.

For questions, support and general discussion, please use GitHub Discussions;

Get GoReleaser

Documentation

Documentation is hosted live at https://goreleaser.com

Badges

Release Software License Build status Codecov branch Go Doc Powered By: GoReleaser Backers on Open Collective Sponsors on Open Collective Conventional Commits

Sponsors

Does your company use goreleaser? Help keep the project bug-free and feature rich by sponsoring the project.

Backers

Love our work and community? Become a backer.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Stargazers over time

Stargazers over time

Languages
Go 93.4%
Nix 2.2%
Ruby 2%
YAML 1%
HTML 0.6%
Other 0.8%