1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00
goreleaser/pkg
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
..
archive docs: add more podman details 2022-11-08 23:15:12 -03:00
build feat: support GOAMD64 (#3016) 2022-04-11 22:43:22 -03:00
config feat: build of shared/static libraries (#3511) 2022-11-11 23:35:51 -03:00
context fix: ruleguard and semgrep scans and fixes (#3364) 2022-09-11 15:32:23 -03:00
defaults feat: remove gofish (#3312) 2022-08-16 01:16:45 -03:00