@@ -60,7 +60,7 @@ rm -rf ${work_dir}/sdk_to_push/.git
6060
6161# Initialize git repo
6262cd ${work_dir} /git_repo
63- git clone ${REPO_URL_SSH} ./
63+ git clone ${REPO_URL_SSH} ./ --quiet
6464git config user.name " ${COMMIT_NAME} "
6565git config user.email " ${COMMIT_EMAIL} "
6666
@@ -89,13 +89,12 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
8989 fi
9090
9191 git add services/${service} /
92- if [ " ${LANGUAGE} " == " go" ] && [ ! -d " ${work_dir} /sdk_backup/services/${service} /" ]; then # Check if it is a newly added SDK module
93- # 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
94- # the -r flag examines subdirectories of dir recursively
95- # this prevents errors if there is more than one new module in the SDK generation
96- go work use -r .
97- git add go.work
98- fi
92+
93+ # 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
94+ # The -r flag examines subdirectories of dir recursively
95+ # This prevents errors if there is more than one new module in the SDK generation
96+ go work use -r services
97+ git add go.work
9998
10099 if [[ " $branch " != " main" ]]; then
101100 echo " >> Creating PR for $service "
@@ -105,19 +104,21 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
105104 gh pr create --title " Generator: Update SDK /services/$service " --body " $COMMIT_INFO " --head " $branch " --base " main"
106105 else
107106 echo " >> Pushing changes for $service service..."
107+ go work use services/$service
108108
109109 # If lint or test fails for a service, we skip it and continue to the next one
110110 make lint skip-non-generated-files=true service=$service || {
111- echo " ! Linting failed for $service "
111+ echo " ! Linting failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED. "
112112 continue
113113 }
114114 make test skip-non-generated-files=true service=$service || {
115- echo " ! Testing failed for $service "
115+ echo " ! Testing failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED. "
116116 continue
117117 }
118118
119- git commit -m " Generate $service : $COMMIT_INFO "
120- git push origin " $branch "
119+ echo " >> Actually pushing changes to main for $service service..."
120+ # git commit -m "Generate $service: $COMMIT_INFO"
121+ # git push origin "$branch"
121122 fi
122123 fi
123124done
0 commit comments