Skip to content

Commit 54c3ee7

Browse files
author
AJ ONeal
committed
build: update for --single-target and note the same in the README
1 parent 38cdd49 commit 54c3ee7

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ builds:
88
- id: dashmsg-default
99
main: ./cmd/dashmsg/
1010
env:
11-
- CGO_ENABLED=0
11+
- CGO_ENABLED=1
1212
goos:
1313
- darwin
1414
- linux

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ pushd ./dashmsg/
6767
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
6868
```
6969

70+
### GoReleaser
71+
72+
Because one of the dependencies requires `CGO_ENABLED=1` and uses low-level syscalls (I have no idea why - probably completely unnecessary), it must be built on and released from the respective OSes.
73+
74+
```bash
75+
goreleaser -f .goreleaser.yml --rm-dist --single-target --skip-validate
76+
```
77+
78+
```txt
79+
--single-target - build only for the current OS
80+
--skip-validate - uploads the image even though it can update the checksums
81+
```
82+
83+
**Note**: MacOS actually can build both the amd64 and arm64 versions on an M1.
84+
7085
## Go Library
7186

7287
Documentation at <https://pkg.go.dev/github.com/dashhive/dashmsg>.

0 commit comments

Comments
 (0)