@@ -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
@@ -108,16 +108,30 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
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+
115+ go work sync
116+
117+ # TODO: Just for testing
118+ echo " >> Adding $service to go.work..."
119+ echo " ## pwd: $( pwd) "
120+ # echo "## cat go.work: $(cat go.work)"
121+ # echo "## ls -la services: $(ls -la services)"
122+
123+ # make test skip-non-generated-files=true service=$service || {
124+ # echo "! Testing failed for $service. THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
125+ # continue
126+ # }
127+ go test services/${service} -timeout=5m -cover -count=1 || {
128+ echo " ! Testing failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
116129 continue
117130 }
118131
119- git commit -m " Generate $service : $COMMIT_INFO "
120- git push origin " $branch "
132+ echo " >> Actually pushing changes to main for $service service..."
133+ # git commit -m "Generate $service: $COMMIT_INFO"
134+ # git push origin "$branch"
121135 fi
122136 fi
123137done
0 commit comments