@@ -67,6 +67,8 @@ git config user.email "${COMMIT_EMAIL}"
6767
6868cp -a . ${work_dir} /sdk_backup
6969
70+ echo -e " \n>> Before service loop"
71+
7072# Create PR for each new SDK module if there are changes
7173for service_path in ${work_dir} /sdk_to_push/services/* ; do
7274 service=" ${service_path##*/ } "
@@ -87,10 +89,16 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
8789 git switch main # This is needed to create a new branch for the service without including the previously committed files
8890 branch=" $BRANCH_PREFIX /$service "
8991 git switch -c " $branch "
92+ echo -e " inside switch"
9093 else
9194 branch=$BRANCH_PREFIX
95+ echo -e " not inside switch"
9296 fi
9397
98+ ls -al services/
99+ ls -al services/alb
100+ ls -al services/${service} /
101+
94102 git add services/${service} /
95103 if [ " ${LANGUAGE} " == " go" ] && [ ! -d " ${work_dir} /sdk_backup/services/${service} /" ]; then # Check if it is a newly added SDK module
96104 # go work use -r adds a use directive to the go.work file for dir, if it exists, and removes the use directory if the argument directory doesn’t exist
@@ -116,15 +124,15 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
116124 }
117125 fi
118126
119- if [[ " $branch " != " main" ]]; then
120- echo " >> Creating PR for $service "
121- git commit -m " Generate $service "
122- git push origin " $branch "
123- gh pr create --title " Generator: Update SDK /services/$service " --body " $COMMIT_INFO " --head " $branch " --base " main"
124- else
125- echo " >> Pushing changes for $service service..."
126- git commit -m " Generate $service : $COMMIT_INFO "
127- git push origin " $branch "
128- fi
127+ # if [[ "$branch" != "main" ]]; then
128+ # echo ">> Creating PR for $service"
129+ # git commit -m "Generate $service"
130+ # git push origin "$branch"
131+ # gh pr create --title "Generator: Update SDK /services/$service" --body "$COMMIT_INFO" --head "$branch" --base "main"
132+ # else
133+ # echo ">> Pushing changes for $service service..."
134+ # git commit -m "Generate $service: $COMMIT_INFO"
135+ # git push origin "$branch"
136+ # fi
129137 fi
130138done
0 commit comments