Skip to content

Commit

Permalink
Condensed old/new ver determination routine ↞ [auto-sync from https:/…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 9, 2024
1 parent 05f5ab0 commit bcfc7fc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions utils/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ for manifest in "${MANIFEST_PATHS[@]}" ; do
# Determine old/new versions
old_ver=$(sed -n 's/.*"version": *"\([0-9.]*\)".*/\1/p' "$manifest_path")
if [[ $old_ver == "$TODAY" ]] ; then
new_ver="$TODAY.1"
new_ver="$TODAY.1"
elif [[ $old_ver == "$TODAY."* ]] ; then
LAST_NUMBER=$(echo "$old_ver" | awk -F '.' '{print $NF}')
new_ver="$TODAY.$((LAST_NUMBER + 1))"
else
new_ver="$TODAY"
fi
LAST_NUMBER=$(echo "$old_ver" | awk -F '.' '{print $NF}')
new_ver="$TODAY.$((LAST_NUMBER + 1))"
else new_ver="$TODAY" ; fi
new_versions+=("$new_ver")

# Bump old version
Expand Down

0 comments on commit bcfc7fc

Please sign in to comment.