From cdab5ab4c81abb660872b4127511b04f776ee49a Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Sat, 12 Oct 2024 17:44:16 -0400 Subject: [PATCH] chore: add date & time to version --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 67c1186..eb94023 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ BUILD_DIR = ./build TMP_DIR = ./tmp APPS := $(notdir $(wildcard ./cmd/*)) -VERSION := $(shell git rev-parse --short HEAD) +COMMIT_HASH := $(shell git rev-parse --short HEAD) +DATE := $(shell date +"%Y%m%d-%H%M%S") +VERSION := $(COMMIT_HASH)-$(DATE) FLAGS := "-s -w -X main.Version=$(VERSION)" all: build