Skip to content

Commit

Permalink
Merge pull request #19 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 13, 2024
2 parents f887543 + 57e13ca commit 617427f
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 617427f

Please sign in to comment.