Skip to content

Commit

Permalink
build: add Windows builds (#307)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
  • Loading branch information
ferdiozturk and buchdag authored Dec 19, 2023
1 parent 1cabcfb commit e83abba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dist-clean:
rm -f docker-gen-alpine-linux-*.tar.gz
rm -f docker-gen-linux-*.tar.gz
rm -f docker-gen-darwin-*.tar.gz
rm -f docker-gen-windows-*.tar.gz

dist: dist-clean
mkdir -p dist/alpine-linux/amd64 && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -a -tags netgo -installsuffix netgo -o dist/alpine-linux/amd64/docker-gen ./cmd/docker-gen
Expand All @@ -26,7 +27,8 @@ dist: dist-clean
mkdir -p dist/linux/armel && GOOS=linux GOARCH=arm GOARM=5 go build -ldflags "$(LDFLAGS)" -o dist/linux/armel/docker-gen ./cmd/docker-gen
mkdir -p dist/linux/armhf && GOOS=linux GOARCH=arm GOARM=6 go build -ldflags "$(LDFLAGS)" -o dist/linux/armhf/docker-gen ./cmd/docker-gen
mkdir -p dist/darwin/amd64 && GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o dist/darwin/amd64/docker-gen ./cmd/docker-gen

mkdir -p dist/windows/i386 && GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o dist/windows/i386/docker-gen ./cmd/docker-gen
mkdir -p dist/windows/amd64 && GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o dist/windows/amd64/docker-gen ./cmd/docker-gen

release: dist
go mod tidy
Expand All @@ -39,6 +41,8 @@ release: dist
tar -cvzf docker-gen-linux-armel-$(TAG).tar.gz -C dist/linux/armel docker-gen
tar -cvzf docker-gen-linux-armhf-$(TAG).tar.gz -C dist/linux/armhf docker-gen
tar -cvzf docker-gen-darwin-amd64-$(TAG).tar.gz -C dist/darwin/amd64 docker-gen
tar -cvzf docker-gen-windows-amd64-$(TAG).tar.gz -C dist/windows/amd64 docker-gen
tar -cvzf docker-gen-windows-i386-$(TAG).tar.gz -C dist/windows/i386 docker-gen

get-deps:
go mod download
Expand Down

0 comments on commit e83abba

Please sign in to comment.