Skip to content

Commit

Permalink
Merge pull request #22 from rgdoliveira/main_prodscript
Browse files Browse the repository at this point in the history
productized/remove_modules.sh: fail script if module is not found in the pom
  • Loading branch information
rgdoliveira authored Feb 12, 2024
2 parents d8b2fd4 + 29bda25 commit 219b2a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion productized/remove_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ do
modules_list=$(echo $modules | tr "," "\n")
for module in ${modules_list}
do
if ! grep -Rq "<module>${module}</module>" ${pom} ; then
echo "Could not find module ${module} in ${pom}. Exiting script..."
exit 1
fi
echo "Removing module ${module} from ${pom}"
sed -i "/<module>${module}<\/module/d" ${pom}
sed -i "/<module>${module}<\/module>/d" ${pom}
done
done

0 comments on commit 219b2a4

Please sign in to comment.