1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00
Giorgio Azzinnaro 0a536f08fd
feat: build of shared/static libraries (#3511)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

This PR improves the handling of shared or static libraries by
GoReleaser. It uses the default behaviour of the Go compiler by
appending the right extension to libraries.

* `.so` and `.a` for Linux shared libraries and static libraries
respectively
* `.dylib` and `.a.` on Darwin
* `.dll` and `.lib` on Windows (pre-existent)

It does not add any configuration option to `.goreleaser.yml`, since it
leverages the existing `buildmode` flag.

Additionally, this PR takes care of adding the generated header file
into the archive.

<!-- Why is this change being made? -->

Personally I would leverage this change to release some software both as
a CLI and as a shared library. I believe others who use CGo or need
interoperability with Go from other languages could benefit from this.

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

This was previously discussed in #3497.

I couldn't quite think of a proper way to add some tests to the header
archiving feature. Any recommendation?
2022-11-11 23:35:51 -03:00
2022-11-08 00:15:24 -03:00
2021-10-26 15:15:26 -03:00
2022-06-11 23:25:04 -03:00
2022-08-21 15:36:37 -03:00
2022-10-31 16:06:50 -03:00
2022-05-02 20:30:19 -03:00
2022-02-08 14:21:36 -03:00
2021-12-20 21:34:34 -03:00
2022-08-08 09:26:09 -03:00
2022-10-27 15:06:26 -03:00
2022-05-18 12:12:42 -03:00
2022-11-08 00:05:36 -03:00
2022-10-11 09:17:06 -03:00
2021-09-27 23:19:23 -03: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.


Get GoReleaser

Documentation

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

Community

You have questions, need support and or just want to talk about GoReleaser?

Here are ways to get in touch with the GoReleaser community:

Join Discord Follow Twitter GitHub Discussions

You can find the links above and all others here.

Code of Conduct

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.

Badges

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

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.1%
Ruby 2%
YAML 1%
HTML 0.6%
Other 0.9%