[Mageia-dev] Does anyone have a script that bumps releases?
nicolas vigier
boklm at mars-attacks.org
Sun Mar 31 16:23:35 CEST 2013
On Sun, 31 Mar 2013, Colin Guthrie wrote:
> Hi,
>
> Does anyone have a script that will bump the release of a given spec file?
>
> Obviously there are lots of different forms to set the release and I
> guess the script has to back through the definition chain to find the
> right place to "add one".
You can do it with Youri::Package::RPM::Updater :
$ perl -MYouri::Package::RPM::Updater -e \
"Youri::Package::RPM::Updater->new->update_from_spec(glob('SPECS/*.spec'))"
It only works for simple cases like "Release: %mkrel 1" and with the
definition of a %rel or %release macro. If something more complexe is
needed, it should use a %rel macro for the part that can be bumped.
Like this :
%define rel 1
Release: 1.2.3.4.%{rel}.0
More information about the Mageia-dev
mailing list