Skip to content

Commit

Permalink
chore: add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbhor committed Jan 16, 2024
1 parent eb43fc8 commit d1a3b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
env:
- CGO_ENABLED=0

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=1
binary: kaf-relay
main: ./
goos:
- windows
- darwin
Expand All @@ -15,10 +17,11 @@ builds:
- netbsd
goarch:
- amd64
ldflags:
- -s -w -X "main.buildString=${BUILDSTR}"

archives:
- format: tar.gz
rlcp: true
files:
- config.toml.sample
- README.md
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIST := dist
.PHONY: dist
dist:
mkdir -p ${DIST}
CGO_ENABLED=1 go build -o ${BIN} --ldflags="-X 'main.buildString=${BUILDSTR}'"
CGO_ENABLED=0 go build -o ${BIN} --ldflags="-X 'main.buildString=${BUILDSTR}'"
cp ${BIN} ${DIST}

.PHONY: clean
Expand Down

0 comments on commit d1a3b90

Please sign in to comment.