Name: My Software
Version: 1.0.5
Release: 1
Summary: This is my software
Not sure if anyone has tried this before or if it is easy, but:
A spec file has two unique indicators for its version:
I'm wondering if anyone has tried, or knows how, I could use the Jenkins $BUILD_NUMBER variable to dynamically change the Release
number, thereby increasing the Release
number every time a new successful build completes...?
It's been a long time... and thankfully I have no rpm based systems so I can't test this.
You can pass parameters to rpmbuild
on the commandline
rpmbuild --define="version ${env.BUILD_NUMBER}"
It would be helpful to post snippets of the spec and the script you're using to build the rpm. You don't want your build script editing the spec file, which I'm assuming it's pulling out down from some source control.