From ec3c4f38b57c8702c145ad0baa8ae50789b68e60 Mon Sep 17 00:00:00 2001 From: machine424 Date: Fri, 28 Nov 2025 09:01:51 +0100 Subject: [PATCH 1/2] 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. --- Makefile | 3 ++- VERSION | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 VERSION diff --git a/Makefile b/Makefile index ad1b8b0..69c1341 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -VERSION:=$(shell cat VERSION) +# Use the git tag name if at a tagged commit, otherwise use the short commit hash +VERSION:=$(shell git describe --tags --exact-match --match "v*" 2>/dev/null || git rev-parse --short HEAD) IMAGE_NAME ?= prometheus-example-app diff --git a/VERSION b/VERSION deleted file mode 100644 index 0eec13e..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.4.2 From 7b9f857e899e3307aa2469d9d315c9504b027d34 Mon Sep 17 00:00:00 2001 From: machine424 Date: Fri, 28 Nov 2025 09:08:51 +0100 Subject: [PATCH 2/2] chore: explain how to release in README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d466c30..bc6090b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ Usage is simple, on any request to `/` the request will result in a `200` respon A Docker image is available at: `ghcr.io/rhobs/prometheus-example-app` +# Releasing + +Cut a new `vX.Y.Z` tag and publish a release based on that tag. + ## Deploying in a Kubernetes cluster First, deploy one instance of this example application, which listens and exposes metrics on port 8080 using the following [Deployment manifest](manifests/deployment.yaml).