Fix wrong evaluation of pre-release timestamps.

It seems that the variables might be evaluated in wrong order, causing
the `%{release_string}` to not be expanded properly, probably depending
on RPM version. It seems that `%define`s are lazy evaluated, which fixes
the situation.
This commit is contained in:
Vít Ondruch 2020-01-08 15:11:16 +01:00
commit edf91e2b8a

View file

@ -17,8 +17,8 @@
# If revision and milestone are removed/commented out, the official release build is expected.
%if 0%{?milestone:1}%{?revision:1} != 0
%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision}}
%define ruby_archive_timestamp %%(stat --printf='@%Y' %%{ruby_archive}.tar.xz | date -f - +"%Y%m%d")
%global development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}}
%define ruby_archive_timestamp %(stat --printf='@%Y' %{ruby_archive}.tar.xz | date -f - +"%Y%m%d")
%define development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}}
%endif