crowdsec/platform/unix_common.mk
mmetc 3288fad341
set BUILD_VERSION to the correct tag (#1885)
This fixes a regression introduced in 0449ec18 (Windows Support #1159)
where the build system uses the last local tag that has been created
(chonologically) instead of the most recent tag in the current branch.
This problem is not detected while working with stable versions because
they are built on a clean checkout.
2022-11-24 10:34:44 +01:00

23 lines
810 B
Makefile

RM=rm -rf
CP=cp
CPR=cp -r
MKDIR=mkdir -p
# Go should not be required to run functional tests
GOOS ?= $(shell command -v go >/dev/null && go env GOOS)
GOARCH ?= $(shell command -v go >/dev/null && go env GOARCH)
GO_MAJOR_VERSION = $(shell command -v go >/dev/null && go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell command -v go >/dev/null && go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
BUILD_GOVERSION="$(shell command -v go >/dev/null && go version | cut -d " " -f3 | sed -E 's/[go]+//g')"
#Current versioning information from env
BUILD_VERSION?="$(shell git describe --tags)"
BUILD_CODENAME="alphaga"
BUILD_TIMESTAMP=$(shell date +%F"_"%T)
BUILD_TAG?="$(shell git rev-parse HEAD)"
DEFAULT_CONFIGDIR?=/etc/crowdsec
DEFAULT_DATADIR?=/var/lib/crowdsec/data