@@ -52,35 +52,28 @@ function build_narayana_lra {
5252 export MAVEN_OPTS=" -Xmx1024m -XX:MaxMetaspaceSize=512m"
5353
5454 LRA_REPO=${LRA_REPO:- jbosstm}
55- LRA_BRANCH=main
55+ LRA_BRANCH=${LRA_BRANCH :- main}
5656 # rm -rf ~/.m2/repository/
5757 rm -rf lra
58- git clone https://github.com/${LRA_REPO} /lra.git -b ${LRA_BRANCH}
58+ git clone https://github.com/${LRA_REPO} /lra.git
5959 [ $? = 0 ] || fatal " git clone https://github.com/${LRA_REPO} /lra.git failed"
60- echo " Checking if need Narayana LRA PR"
61- if [ -n " $LRA_PR_BRANCH " ]; then
62- echo " Building LRA PR ${LRA_PR_BRANCH} "
63- cd lra
64- git fetch origin +refs/pull/* /head:refs/remotes/jbosstm/pull/* /head
65- [ $? = 0 ] || fatal " git fetch of pulls failed"
66- git checkout $LRA_PR_BRANCH
67- [ $? = 0 ] || fatal " git fetch of pull branch failed"
68- cd ../
69- fi
70-
71- if [ $? != 0 ]; then
72- echo " Checkout failed"
73- exit -1
74- fi
60+ echo " Checking if need an LRA PR"
61+ echo " Building LRA PR ${LRA_BRANCH} "
7562 cd lra
63+ git fetch origin +refs/pull/* /head:refs/remotes/jbosstm/pull/* /head
64+ [ $? = 0 ] || fatal " git fetch of pulls failed"
65+ git checkout $LRA_BRANCH
66+ [ $? = 0 ] || fatal " Checkout failed: $BUILD_URL " ;
67+
7668 ./build.sh clean install -B -DskipTests
7769 [ $LRA_CURRENT_VERSION ] || export LRA_CURRENT_VERSION=` grep " <version>" pom.xml | head -n 2 | tail -n 1 | sed " s/ *<version>//" | sed " s#</version>##" `
78- cd ..
7970
8071 if [ $? != 0 ]; then
8172 echo " Narayana LRA build failed" ;
8273 exit -1
8374 fi
75+
76+ cd ..
8477}
8578
8679function download_and_update_as {
0 commit comments