Skip to content

Commit

Permalink
More error checking (#6179)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwxm authored and effectfully committed Aug 6, 2024
1 parent 96cb159 commit 7fd7f03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ VERSION=$2

IFS='.' read -r -a components <<< "$VERSION"

if [[ ${#components[@]} < 2 ]]; then
echo "Too few components in version number" $VERSION "(need at least two)"
usage
exit 1
fi

major_version="${components[0]}.${components[1]}"

echo "Updating version of $PACKAGE to $VERSION"
Expand Down

0 comments on commit 7fd7f03

Please sign in to comment.