From 236f76394e66ad96d14e110ba429e2af2765452c Mon Sep 17 00:00:00 2001 From: Hubertbits <170125456+hubertbits@users.noreply.github.com> Date: Sat, 12 Apr 2025 01:01:56 +0200 Subject: [PATCH] Makefile: fix default target and TAG var Signed-off-by: yxxhero --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 875d6c8c..07476d06 100644 --- a/Makefile +++ b/Makefile @@ -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..."