From 5f16c8ba3979e5847e5175d4d3e35fd96113cf21 Mon Sep 17 00:00:00 2001 From: name Date: Tue, 30 May 2023 11:18:59 +0000 Subject: [PATCH] better release --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 30b9db3..beecb07 100644 --- a/Makefile +++ b/Makefile @@ -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: