fix(packaging): use version from spec file for RPM builds
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Update Makefile to extract PKG_VERSION from spec file
Reads '%define spec_version 1.0.2' as default version
- Update spec file with proper version macro logic
Version field now uses %{spec_version}
Supports override via --define 'build_version X.Y.Z'
Falls back to 1.0.2 when build_version is not defined
This ensures RPM packages are built with the correct version
defined in the spec file (1.0.2) instead of hardcoded 1.0.0.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
7
Makefile
7
Makefile
@ -20,11 +20,8 @@ BUILD_DIR=build
|
||||
# RPM build directory
|
||||
RPM_DIR=$(DIST_DIR)/rpm
|
||||
|
||||
# Package version (strip 'v' prefix from git tags)
|
||||
# Set to explicit version for release builds, or use git-based version for dev builds
|
||||
PKG_VERSION ?= 1.0.0
|
||||
# Alternative git-based version (uncomment for dev builds):
|
||||
# PKG_VERSION=$(shell git describe --tags --always --dirty 2>/dev/null | sed 's/^v//')
|
||||
# Package version (extract default from spec file, can be overridden)
|
||||
PKG_VERSION ?= $(shell grep '^%define spec_version' packaging/rpm/ja4sentinel.spec | tail -1 | awk '{print $$3}')
|
||||
|
||||
# Build flags
|
||||
VERSION=$(PKG_VERSION)
|
||||
|
||||
Reference in New Issue
Block a user