@@ -48,7 +48,7 @@ if [[ ! ${work_dir} || -d {work_dir} ]]; then
4848fi
4949
5050# Delete temp directory on exit
51- trap " rm -rf ${work_dir} " EXIT
51+ # trap "rm -rf ${work_dir}" EXIT
5252
5353mkdir ${work_dir} /git_repo # Where the git repo will be created
5454mkdir ${work_dir} /sdk_backup # Backup of the SDK to check for new modules
@@ -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
@@ -98,26 +98,28 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
9898 fi
9999
100100 if [[ " $branch " != " main" ]]; then
101- echo " >> Creating PR for $service "
101+ echo -e " \n >> Creating PR for $service "
102102
103103 git commit -m " Generate $service "
104104 git push origin " $branch "
105105 gh pr create --title " Generator: Update SDK /services/$service " --body " $COMMIT_INFO " --head " $branch " --base " main"
106106 else
107- echo " >> Pushing changes for $service service..."
107+ echo -e " \n >> Pushing changes for $service 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 }
114- make test skip-non-generated-files=true service= $service || {
115- echo " ! Testing failed for $service "
114+ go test ./services/ ${service} -timeout=5m -cover -count=1 || {
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+ echo " >> git diff for service $service : $( git status --porcelain " services/$service " ) "
121+ # git commit -m "Generate $service: $COMMIT_INFO"
122+ # git push origin "$branch"
121123 fi
122124 fi
123125done
0 commit comments