fix: use version from .spec file for RPM builds

- Extract version dynamically from packaging/rpm/logcorrelator.spec
- Apply to both Dockerfile and Dockerfile.package
- Ensures RPM packages always use the correct version from spec file

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-01 00:19:14 +01:00
parent 87b94f3c18
commit 9bb6ae3106
2 changed files with 5 additions and 5 deletions

View File

@ -94,7 +94,7 @@ RUN mkdir -p /tmp/pkgroot/var/log/logcorrelator && \
chmod 755 /tmp/pkgroot/var/run/logcorrelator
# Build RPM
ARG VERSION=1.0.0
ARG VERSION=$(grep -m1 "^Version:" packaging/rpm/logcorrelator.spec | awk '{print $2}')
RUN fpm -s dir -t rpm \
-n logcorrelator \
-v ${VERSION} \