From 6a0644d9af2019f05d5277dbfe7f8a13456fd43b Mon Sep 17 00:00:00 2001 From: Adora Laura Kalb Date: Fri, 26 Jul 2024 10:54:02 +0200 Subject: [PATCH] add makefile --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a4e661 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +# Set the default Go build flags +GOFLAGS = -ldflags='-w -s -X main.Version=$(VERSION)' + +# Build the application +build: + go build $(GOFLAGS) -o bin/mailcow-admin-aliases cmd/mailcow-admin-aliases/main.go + +# Clean the build artifacts +clean: + rm -rf bin + +# Run the application +run: build + ./bin/mailcow-admin-aliases + +# Set a version for the build +VERSION := $(shell git describe --tags --always)