Issue
I am looking for a good workflow with the help of which I can automate the version and release information for building an RPM by Jenkins.
[name]-[version]-[release].[arch].rpm
At the moment, both details are entered manually in the Jenkinsjob (build with parameters). It is not very nice. The version number is in my setup.py. How can I read them out in a Jenkins job? Is sed the right choice to use? The release information is currently not stored anywhere. Where is this entered in your projects? Do you have an additional release.txt file with the current rpm release number?
Solution
There is no common ground. Everybody uses something else. Some people have:
Name: @@NAME@@
Version: @@VERSION@@
and replace it using sed. Some people use autotools and have foo.spec.in and let autotools expand the variables there.
I personally, use tito which can use templates during tagging (see VERSION_TEMPLATE in man tito.props
)
Answered By - msuchy