Skip to content

Commit

Permalink
Merge pull request #13 from abstractdog/cdpd_patcher_no_pom
Browse files Browse the repository at this point in the history
skip pom.xml pig.version patching if repo is not maven based and there is no pom.xml
  • Loading branch information
abstractdog authored Mar 23, 2023
2 parents a0f9f48 + 4d5bc87 commit b89a485
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/scripts/cdpd-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,15 @@ wget -nv -O $tmp "${patch_url}/${COMPONENT}-source.patch" ||
wget -nv -O $tmp "${patch_url}/dag_build/${COMPONENT}-source.patch"
git apply -p1 -C0 $tmp || git apply -3 -p1 -C0 $tmp
if [[ "$build" < "7.2.1" && "$VERSION" != "7.0.2.1" ]];then
sed -i "s/pig.version>0.16.0.*</pig.version>0.16.0.${build}</" pom.xml
else
sed -i "s/pig.version>0.16.0.*</pig.version>0.16.0</" pom.xml
if test -f "pom.xml"; then
echo "found pom.xml, trying to patch pig version"
if [[ "$build" < "7.2.1" && "$VERSION" != "7.0.2.1" ]];then
sed -i "s/pig.version>0.16.0.*</pig.version>0.16.0.${build}</" pom.xml
else
sed -i "s/pig.version>0.16.0.*</pig.version>0.16.0</" pom.xml
fi
fi
echo "@@@ patched"

0 comments on commit b89a485

Please sign in to comment.