Skip to content

Commit

Permalink
add docker and win build
Browse files Browse the repository at this point in the history
  • Loading branch information
kost committed Nov 10, 2023
1 parent 58b4751 commit f139d76
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ tools:
go install github.com/mitchellh/gox@latest
go install github.com/tcnksm/ghr@latest


ver:
echo version $(VERSION)

Expand All @@ -31,6 +30,12 @@ dist:
gox:
CGO_ENABLED=0 gox -osarch="!darwin/386" ldflags="-s -w -X main.Version=$(VERSION) -X main.CommitID=$(GIT_COMMIT)" -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}"

goxwin:
CGO_ENABLED=0 gox -osarch="windows/amd64" ldflags="-s -w -X main.Version=$(VERSION) -X main.CommitID=$(GIT_COMMIT)" -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}"

dokbuild:
docker run -it --rm -v $(PWD):/app golang:alpine /bin/sh -c 'apk add make file git && git config --global --add safe.directory /app && cd /app && make tools && make -B all && make gox && make gowwin'

draft:
ghr -draft v$(VERSION) dist/

0 comments on commit f139d76

Please sign in to comment.