tito
tito copied to clipboard
Add option to set build number for --test
When using --test option the package name will be something like:
<package name>-<package version>.git.<commit count>.<last commit hash>.el7eng.noarch.rpm
foobar-0.0.1-1.git.0.5a86da9.el7eng.noarch.rpm
The problem is that sometimes the commit count is the same when building multiple patches. The count is usually 0 (zero) and the hash is not a number, in this case the new version string can be lower than the old one and the test package won't install because is a downgrade.
It would be nice to have an option to set this parameter. For example, when using Jenkins or other CI this parameter could easily be set to the BUILD NUMBER, this will ensure that the version is always greater than the older one.
I'm not sure if this option fits somewhere, maybe in the tito.props
file or somewhere else.
So far I wrote a custom builder to do this trick and use CI build number.