Makefile: fix default target and TAG var

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
Hubertbits 2025-04-12 01:01:56 +02:00 committed by yxxhero
parent b8d8a52ff7
commit 236f76394e
1 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,8 @@ PKGS := $(shell go list ./... | grep -v /vendor/)
INSTALL_DEPS ?= 0
TAG ?= $(shell git describe --tags --abbrev=0 HEAD)
TAG ?= $(shell git describe --tags --abbrev=0 HEAD 2>/dev/null || echo "v0.0.1")
LAST = $(shell git describe --tags --abbrev=0 HEAD^)
BODY = "`git log ${LAST}..HEAD --oneline --decorate` `printf '\n\#\#\# [Build Info](${BUILD_URL})'`"
DATE_FMT = +"%Y-%m-%dT%H:%M:%S%z"
@ -29,6 +30,9 @@ define check_command
command -v $(1) >/dev/null
endef
all: build
.PHONY: all
# Install all required Go tools
install-go-deps:
@echo "Installing Go dependencies..."