File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed
Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -60,24 +60,25 @@ update_region() {
6060 echo " Updating $region ..."
6161 echo " Ensure temp directory..."
6262 echo " XMFKILLA_REF_ASB_PATH is set to $XMFKILLA_REF_ASB_PATH "
63- mkdir -p $XMFKILLA_REF_ASB_PATH
64- echo " Running command: $program " $region " " $pustaka_dir " " $json " $2 $3 $4 "
63+ mkdir -p " $XMFKILLA_REF_ASB_PATH "
64+
65+ echo " Running command: $program \" $region \" \" $pustaka_dir \" \" $json \" $2 $3 $4 "
6566 $program " $region " " $pustaka_dir " " $json " $2 $3 $4
66- retval=$?
67- case $retval in
68- 0) echo " No changes on $region , skipping..." ;;
69- 1)
70- echo " Changes detected for $region !"
71- git add .
72- git commit -m " Update pustaka for $region @$timestamp "
73- git push origin-ssh
74- ;;
75- -2147483648) echo " Error occurred for $region , skipping..." ;;
76- * ) echo " Unexpected return value $retval for $region " ;;
77- esac
67+
68+ # Check if there are any staged or unstaged changes
69+ if [[ -n $( git status --porcelain) ]]; then
70+ echo " Changes detected for $region !"
71+ git add .
72+ git commit -m " Update pustaka for $region @$timestamp "
73+ git push origin-ssh
74+ else
75+ echo " No changes on $region , skipping..."
76+ fi
77+
7878 echo
7979}
8080
81+
8182# Update all regions
8283update_region " Hi3SEA" " " " " " "
8384update_region " Hi3Global" " " " " " "
You can’t perform that action at this time.
0 commit comments