From ad8719e2a60600875aa757f1ba051e3fc665f52e Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Feb 14 2024 14:48:10 +0000 Subject: Simplify setting up the git repository required by the tests As a side effect, git-core is now required even when tests are disabled --- diff --git a/pre-commit.spec b/pre-commit.spec index 6398b23..7b2f78d 100644 --- a/pre-commit.spec +++ b/pre-commit.spec @@ -12,6 +12,7 @@ Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-% BuildArch: noarch +BuildRequires: git-core BuildRequires: python3-devel %if %{with check} @@ -34,7 +35,6 @@ BuildRequires: python3-devel # BuildRequires: swift-lang BuildRequires: cargo -BuildRequires: git-core BuildRequires: lua-devel BuildRequires: luarocks BuildRequires: nodejs @@ -52,7 +52,7 @@ A framework for managing and maintaining multi-language pre-commit hooks. %prep -%autosetup -p1 +%autosetup -p1 -S git # Do not generate BR’s for coverage, linters, etc.: sed -r '/^(covdefaults|coverage)\b/d' requirements-dev.txt | tee requirements-dev-filtered.txt @@ -73,10 +73,6 @@ sed -r '/^(covdefaults|coverage)\b/d' requirements-dev.txt | %if %{with check} %check -git init -git config --global user.email "you@example.com" -git config --global user.name "Your Name" - # For general discusson on test failures building distribution packages, see: # https://github.com/pre-commit/pre-commit/issues/1183, # https://github.com/pre-commit/pre-commit/issues/1202 @@ -178,6 +174,7 @@ k="${k-}${k+ and }not test_run_a_ruby_hook" %changelog * Mon Jan 01 2024 Benjamin A. Beasley - 3.6.0-2 - Assert that the .dist-info directory contains a license file +- Simplify setting up the git repository required by the tests * Tue Dec 19 2023 Benjamin A. Beasley - 3.6.0-1 - Update to 3.6.0 (close RHBZ#2253802)