add makefile

This commit is contained in:
Adora Laura Kalb 2024-07-26 10:54:02 +02:00
parent b3273545b5
commit 6a0644d9af
Signed by: adoralaura
SSH key fingerprint: SHA256:3XrkbR8ikAZJVtYfaUliX1MhmJYVAe/ocIb/MiDHBJ8

17
Makefile Normal file
View file

@ -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)