Skip to content

Commit 6290504

Browse files
committed
Added log manifests bumped to final summary ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/perplexity-omnibox]
1 parent 0e1311a commit 6290504

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

utils/bump.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MANIFEST_PATH="chromium/extension/manifest.json"
2525
echo -e "${BY}\nBumping version in ${MANIFEST_PATH}...${NC}\n"
2626

2727
# Init BUMP vars
28-
bumped_cnt=0
28+
bumped_manifests=() # for final summary
2929
TODAY=$(date +'%Y.%-m.%-d') # YYYY.M.D format
3030

3131
# Check LATEST COMMIT for extension changes
@@ -50,13 +50,13 @@ else new_ver="$TODAY" ; fi
5050
# BUMP old version
5151
sed -i "s/\"version\": \"$old_ver\"/\"version\": \"$new_ver\"/" "$MANIFEST_PATH"
5252
echo -e "Updated: ${BW}v${old_ver}${NC}${BG}v${new_ver}${NC}\n"
53-
((bumped_cnt++))
54-
if (( $bumped_cnt == 0 )) ; then echo -e "${BW}Completed. No manifests bumped.${NC}" ; exit 0 ; fi
53+
bumped_manifests+=("$platform_manifest_path/manifest.json")
54+
if (( ${#bumped_manifests[@]} == 0 )) ; then echo -e "${BW}Completed. No manifests bumped.${NC}" ; exit 0 ; fi
5555

5656
# ADD/COMMIT/PUSH bump(s)
5757
if [[ "$no_commit" != true ]] ; then
58-
plural_suffix=$((( $bumped_cnt > 1 )) && echo "s")
59-
echo -e "${BG}${bumped_cnt} manifest${plural_suffix} bumped!\n${NC}"
58+
plural_suffix=$((( ${#bumped_manifests[@]} > 1 )) && echo "s")
59+
echo -e "${BG}${#bumped_manifests[@]} manifest${plural_suffix} bumped!\n${NC}"
6060
echo -e "${BY}Committing bump${plural_suffix} to Git...\n${NC}"
6161
COMMIT_MSG="Bumped \`version\`"
6262
unique_versions=($(printf "%s\n" "${new_versions[@]}" | sort -u))
@@ -70,7 +70,8 @@ if [[ "$no_commit" != true ]] ; then
7070
fi
7171
fi
7272

73-
# FINAL log
73+
# Final SUMMARY log
7474
git_action="updated"$( [[ "$no_commit" != true ]] && echo -n "/committed" )$(
7575
[[ "$no_push" != true ]] && echo -n "/pushed" )
76-
echo -e "\n${BG}Success! ${bumped_cnt} manifest${plural_suffix} ${git_action} to GitHub${NC}"
76+
echo -e "\n${BG}Success! ${#bumped_manifests[@]} manifest${plural_suffix} ${git_action} to GitHub${NC}"
77+
for manifest in "${bumped_manifests[@]}" ; do echo -e " ± $manifest" ; done # log manifests bumped

0 commit comments

Comments
 (0)