chore: add date & time to version
All checks were successful
build / build (push) Successful in 1m2s
build / trigger-build-image (push) Successful in 6s

This commit is contained in:
张泊明518370910136 2024-10-12 17:44:16 -04:00
parent f4662eb123
commit cdab5ab4c8
GPG Key ID: D47306D7062CDA9D

View File

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