Skip to content

Commit

Permalink
better release
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed May 30, 2023
1 parent 36b8881 commit 5f16c8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ build-docker:
release-lin:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && go build -o ./build/framed ./main.go"
sudo chown -R $(USER):$(USER) ./build
$(eval VERSION := $(shell git describe --tags --abbrev=0 2> /dev/null || git rev-parse --short HEAD))
tar -czvf ./build/framed-lunux-$(VERSION).tar.gz ./build/framed

# make release for windows
.PHONY: release-win
release-win:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && GOOS=windows GOARCH=amd64 go build -o ./build/framed.exe ./main.go"
sudo chown -R $(USER):$(USER) ./build
$(eval VERSION := $(shell git describe --tags --abbrev=0 2> /dev/null || git rev-parse --short HEAD))
tar -czvf ./build/framed-windows-$(VERSION).tar.gz ./build/framed.exe

# make release for mac
.PHONY: release-mac
release-mac:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && GOOS=darwin GOARCH=amd64 go build -o ./build/framed ./main.go"
sudo chown -R $(USER):$(USER) ./build
$(eval VERSION := $(shell git describe --tags --abbrev=0 2> /dev/null || git rev-parse --short HEAD))
tar -czvf ./build/framed-mac-$(VERSION).tar.gz ./build/framed

.PHONY: build
build:
Expand Down

0 comments on commit 5f16c8b

Please sign in to comment.