1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-19 19:10:18 +02:00

docs: fix typo in builds.md ()

CCX to CXX
This commit is contained in:
GennadySpb 2023-07-25 13:57:54 +03:00 committed by GitHub
parent 77f97a6092
commit 8d9a693843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -597,14 +597,14 @@ Builds environment variables accept templates.
You can leverage that to have a single build configuration with different
environment variables for each platform, for example.
A common example of this is the variables `CC` and `CCX`.
A common example of this is the variables `CC` and `CXX`.
Here are two different examples:
### Using multiple envs
This example creates once `CC_` and `CCX_` variable for each platform, and then
set `CC` and `CCX` to the right one:
This example creates once `CC_` and `CXX_` variable for each platform, and then
set `CC` and `CXX` to the right one:
```yaml
# .goreleaser.yml
@ -622,18 +622,18 @@ builds:
env:
- CGO_ENABLED=0
- CC_darwin_amd64=o64-clang
- CCX_darwin_amd64=o64-clang+
- CXX_darwin_amd64=o64-clang+
- CC_darwin_arm64=aarch64-apple-darwin20.2-clang
- CCX_darwin_arm64=aarch64-apple-darwin20.2-clang++
- CXX_darwin_arm64=aarch64-apple-darwin20.2-clang++
- CC_windows_amd64=x86_64-w64-mingw32-gc
- CCX_windows_amd64=x86_64-w64-mingw32-g++
- CXX_windows_amd64=x86_64-w64-mingw32-g++
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CCX={{ index .Env (print "CCX_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
```
### Using `if` statements
This example uses `if` statements to set `CC` and `CCX`:
This example uses `if` statements to set `CC` and `CXX`:
```yaml
# .goreleaser.yml