Fix version handling for git commit checks

This commit is contained in:
Michal Josef Špaček 2024-08-19 20:32:54 +02:00
parent 4246a6aafd
commit 08d65721fa

View File

@ -1,16 +1,13 @@
# RPM version needs 4 digits after the decimal to preserve upgrade path
%global module_version 0.71
%global RPM_version %(printf "%.4f" %{module_version})
# TODO: BR: optional test dependency Unknown::Values if it becomes available
Name: perl-Test-Differences
Version: %{RPM_version}
%global cpan_version 0.71
Version: 0.7100
Release: 5%{?dist}
Summary: Test strings and data structures and show differences if not OK
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/Test-Differences
Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-Differences-%{module_version}.tar.gz
Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-Differences-%{cpan_version}.tar.gz
BuildArch: noarch
# Module Build
BuildRequires: coreutils
@ -59,7 +56,7 @@ Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n Test-Differences-%{module_version}
%setup -q -n Test-Differences-%{cpan_version}
# Help generators to recognize Perl scripts
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
@ -100,6 +97,7 @@ make test
%changelog
* Mon Aug 19 2024 Michal Josef Špaček <mspacek@redhat.com> - 0.7100-5
- Fix version handling for git commit checks
- Package tests
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.7100-4