Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: small improvement
  • Loading branch information
caarlos0 committed Nov 12, 2022
1 parent 5994892 commit e47bad4
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions www/docs/customization/build.md
Expand Up @@ -52,7 +52,12 @@ builds:
- ./usemsan=-msan

# Custom Go build mode.
# `c-shared` and `c-archive` configure the publishing of the header and set the correct extension.
#
# Valid options:
# - `c-shared`
# - `c-archive`
#
# Since GoReleaser v1.13.
# Default is empty.
buildmode: c-shared

Expand Down Expand Up @@ -525,20 +530,23 @@ You can read more about it

## Building shared or static libraries

GoReleaser supports compiling and releasing C shared or static libraries,
by configuring the [Go build mode](https://pkg.go.dev/cmd/go#hdr-Build_modes).
> Since: v1.13.0
This can be set with `buildmode` in your build. It currently supports `c-shared` and `c-archive`.
Other values will transparently be applied to the build line (via the `-buildmode` flag),
but GoReleaser will not attempt to configure any additional logic.
GoReleaser supports compiling and releasing C shared or static libraries, by
configuring the [Go build mode](https://pkg.go.dev/cmd/go#hdr-Build_modes).

As of today, a template may not be applied to this field.
This can be set with `buildmode` in your build.
It now supports `c-shared` and `c-archive`. Other values will transparently be
applied to the build line (via the `-buildmode` flag), but GoReleaser will not
attempt to configure any additional logic.

GoReleaser will:

* set the correct file extension for the target OS.
* package the generated header file (`.h`) in the release bundle.

Example usage:

```yaml
# .goreleaser.yaml
builds:
Expand Down

0 comments on commit e47bad4

Please sign in to comment.