From ab32c8032c1bf9036abbfd12ba96eb24ccead7c6 Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 10 Jul 2025 17:08:58 +0100 Subject: [PATCH] add and update version to docker image --- .bumpversion.toml | 5 +++++ Dockerfile | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.bumpversion.toml b/.bumpversion.toml index 88cf0b5..b8c275c 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -2,6 +2,11 @@ current_version = "0.2.11" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" serialize = ["{major}.{minor}.{patch}"] + +[[tool.bumpversion.files]] +filename = "Dockerfile" +search = 'ARG VERSION="{current_version}"' +replace = 'ARG VERSION="{new_version}"' search = "{current_version}" replace = "{new_version}" regex = false diff --git a/Dockerfile b/Dockerfile index 8eb6321..aeb9ab5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,13 @@ FROM python:3.11-slim # Set the working directory in the container WORKDIR /app +# Set version label +ARG VERSION="0.2.11" +LABEL version=$VERSION # Copy project files into the container COPY . /app + # Install dependencies RUN pip install --no-cache-dir -r requirements.txt