File 0015-add-all-modified-pom.xml-by-maven.patch of Package tito
From 7c9a37559a9f3afec9ad7255c47397c09f14a522 Mon Sep 17 00:00:00 2001
From: Thomas Florio <thomas.florio@suse.com>
Date: Tue, 16 Apr 2024 14:32:04 +0200
Subject: [PATCH 1/1] Add all modified pom.xml by maven
---
src/tito/tagger/main.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/tito/tagger/main.py b/src/tito/tagger/main.py
index 69af883..d2ce76f 100644
--- a/src/tito/tagger/main.py
+++ b/src/tito/tagger/main.py
@@ -377,7 +377,11 @@ def _update_pom_xml(self, new_version):
run_command("mvn %s versions:set -DnewVersion=%s -DgenerateBackupPoms=false" % (
" ".join(maven_args),
mvn_new_version))
- run_command("git add %s" % pom_file)
+
+ # Find and add all modified pom (main one and those from any existing sub-module)
+ modified_poms = run_command("git ls-files --modified pom.xml */pom.xml")
+ for modified_pom_file in modified_poms.splitlines():
+ run_command("git add %s" % modified_pom_file)
def _update_dependencies_rhn_conf(self):
for section in self.config.sections():
--
2.35.3