~siegfriedehret/tagzytout

37a7fdc4ee59ea9585eb610ece58f979f6d6c11c — Siegfried Ehret 2 years ago ae4d279
🔧 update makefile to package tagzytout
1 files changed, 32 insertions(+), 5 deletions(-)

M Makefile
M Makefile => Makefile +32 -5
@@ 1,7 1,34 @@
build:
	@go build
build: ## Build for the current platform
	go build

deps:
	@go mod tidy
deps: ## Update dependencies
	go mod tidy

.PHONY: build
\ No newline at end of file

package-linux: ## Package tagzytout for Linux (x64)
	mkdir -p bin ;\
	GOOS=linux GOARCH=amd64 go build -o bin/tagzytout ;\
	tar czf bin/tagzytout-linux-x64.tag.gz bin/tagzytout

package-macos: ## Package tagzytout for MacOS (x64)
	mkdir -p bin ;\
	GOOS=darwin GOARCH=amd64 go build -o bin/tagzytout ;\
	tar czf bin/tagzytout-macos-x64.tag.gz bin/tagzytout

package-macos-arm: ## Package tagzytout for MacOS (arn64)
	mkdir -p bin ;\
	GOOS=darwin GOARCH=arm64 go build -o bin/tagzytout ;\
	tar czf bin/tagzytout-macos-arm64.tag.gz bin/tagzytout

package-windows: ## Package tagzytout for Windows
	mkdir -p bin ;\
	GOOS=windows GOARCH=amd64 go build -o bin/tagzytout.exe ;\
	tar czf bin/tagzytout-windows-x64.tag.gz bin/tagzytout.exe

package: package-linux package-macos package-macos-arm package-windows ## Package tagzytout for multiple architectures

.PHONY: all
all: help

help: ## Print this message
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'