Skip to content

Commit ec3c4f3

Browse files
committed
chore: use git tags for versioning instead of VERSION file
Automatically derive version from git tags or commit hash, eliminating the need to manually maintain a VERSION file.
1 parent 7a80023 commit ec3c4f3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
VERSION:=$(shell cat VERSION)
1+
# Use the git tag name if at a tagged commit, otherwise use the short commit hash
2+
VERSION:=$(shell git describe --tags --exact-match --match "v*" 2>/dev/null || git rev-parse --short HEAD)
23

34
IMAGE_NAME ?= prometheus-example-app
45

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)