Skip to content

Commit

Permalink
Merge pull request #10 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 committed Feb 13, 2024
2 parents d9388eb + 0894729 commit 8485943
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 8485943

Please sign in to comment.