Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-draeger authored Dec 21, 2024
1 parent aab56bd commit 4ff6b86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ main() {
major=0; minor=0; patch=0; pre=""; preversion=0

# break down the version number into its components
regex="^v?([0-9]+)\\.([0-9]+)\\.([0-9]+)(-([a-z]+)([0-9]+|\\.([0-9]+))?)?$"
regex="^v?([0-9]+)\.([0-9]+)\.([0-9]+)(-([a-z]+)(\\.([0-9]+))?)?$"
if [[ $prev_version =~ $regex ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
patch="${BASH_REMATCH[3]}"
pre="${BASH_REMATCH[5]}"
preversion="${BASH_REMATCH[6]:-${BASH_REMATCH[7]:-0}}" # Use preversion from either match
preversion="${BASH_REMATCH[7]}"
else
echo "previous version '$prev_version' is not a semantic version"
exit 1
Expand Down

0 comments on commit 4ff6b86

Please sign in to comment.