Update logic for setting version
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
I noticed that versions were not being properly dervied from the git tags. This fixes that in a simpler way by allowing git to describe the current commit with tags, commits, shas, and a dirty maker.
This commit is contained in:
parent
d3826dacde
commit
0684b15a44
5
Makefile
5
Makefile
@ -1,11 +1,10 @@
|
|||||||
DOCKER_TAG ?= minitor-go-${USER}
|
DOCKER_TAG ?= minitor-go-${USER}
|
||||||
GIT_TAG_NAME := $(shell git tag -l --contains HEAD)
|
export VERSION := $(shell git describe --tags --dirty)
|
||||||
GIT_SHA := $(shell git rev-parse HEAD)
|
|
||||||
export VERSION := $(if $(GIT_TAG_NAME),$(GIT_TAG_NAME),$(GIT_SHA))
|
|
||||||
GOFILES = *.go
|
GOFILES = *.go
|
||||||
# Multi-arch targets are generated from this
|
# Multi-arch targets are generated from this
|
||||||
TARGET_ALIAS = minitor-linux-amd64 minitor-linux-arm minitor-linux-arm64 minitor-darwin-amd64
|
TARGET_ALIAS = minitor-linux-amd64 minitor-linux-arm minitor-linux-arm64 minitor-darwin-amd64
|
||||||
TARGETS = $(addprefix dist/,$(TARGET_ALIAS))
|
TARGETS = $(addprefix dist/,$(TARGET_ALIAS))
|
||||||
|
#
|
||||||
# Default make target will run tests
|
# Default make target will run tests
|
||||||
.DEFAULT_GOAL = test
|
.DEFAULT_GOAL = test
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user