Skip to content

Commit

Permalink
build: update for --single-target and note the same in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Mar 14, 2022
1 parent 38cdd49 commit 54c3ee7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ builds:
- id: dashmsg-default
main: ./cmd/dashmsg/
env:
- CGO_ENABLED=0
- CGO_ENABLED=1
goos:
- darwin
- linux
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ pushd ./dashmsg/
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
```

### GoReleaser

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.

```bash
goreleaser -f .goreleaser.yml --rm-dist --single-target --skip-validate
```

```txt
--single-target - build only for the current OS
--skip-validate - uploads the image even though it can update the checksums
```

**Note**: MacOS actually can build both the amd64 and arm64 versions on an M1.

## Go Library

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

0 comments on commit 54c3ee7

Please sign in to comment.