From b8dbc7096a958d490ececd55f391c2a18663413a Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Mon, 9 Dec 2024 00:24:18 -0800 Subject: [PATCH] =?UTF-8?q?Added=20echo=20if=20no=20manifests=20bumped=20?= =?UTF-8?q?=E2=86=9E=20[auto-sync=20from=20https://github.com/adamlui/ai-w?= =?UTF-8?q?eb-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/bump.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/utils/bump.sh b/utils/bump.sh index 232db98..2fa5a39 100644 --- a/utils/bump.sh +++ b/utils/bump.sh @@ -52,17 +52,21 @@ for manifest in "${MANIFEST_PATHS[@]}" ; do echo -e "$bumped_msg" ; ((bumped_cnt++)) done -# Define COMMIT MSG -COMMIT_MSG="Bumped \`version\`" -unique_versions=($(printf "%s\n" "${new_versions[@]}" | sort -u)) -if [[ ${#unique_versions[@]} -eq 1 ]] ; then - COMMIT_MSG+=" to \`${unique_versions[0]}\`" ; fi - # COMMIT/PUSH bump(s) -echo -e "${BY}\nCommitting $((( $bumped_cnt > 1 )) && echo bumps || echo bump) to Git...\n${NC}" -git add ./**/manifest.json && git commit -n -m "$COMMIT_MSG" -git push +if [[ $bumped_cnt -eq 0 ]] ; then echo -e "${BW}Completed. No manifests bumped.${NC}" +else + echo -e "\n${BY}Committing $( (( bumped_cnt > 1 )) && echo bumps || echo bump) to Git...${NC}" + + # Define commit msg + COMMIT_MSG="Bumped \`version\`" + unique_versions=($(printf "%s\n" "${new_versions[@]}" | sort -u)) + if [[ ${#unique_versions[@]} -eq 1 ]] ; then COMMIT_MSG+=" to \`${unique_versions[0]}\`" ; fi + + # Commit/push bump(s) + git add ./**/manifest.json && git commit -n -m "$COMMIT_MSG" + git push -# Print FINAL summary -manifest_label=$((( $bumped_cnt > 1 )) && echo "${bumped_cnt} manifests" || echo "${MANIFEST_PATHS[0]}") -echo -e "\n${BG}Success! ${manifest_label} updated/committed/pushed to GitHub${NC}" + # Print final summary + manifest_label=$( [[ $bumped_cnt -gt 1 ]] && echo "manifests" || echo "manifest") + echo -e "\n${BG}Success! ${bumped_cnt} ${manifest_label} updated/committed/pushed to GitHub${NC}" +fi