Skip to content

Commit

Permalink
fix #8 : add dot to pre release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-draeger authored Jan 27, 2023
1 parent 68f14f8 commit dee875d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ main() {
major=0; minor=0; patch=0; pre=""; preversion=0

# break down the version number into it's components
regex="^([0-9]+).([0-9]+).([0-9]+)((-[a-z]+)([0-9]+))?$"
regex="^([0-9]+).([0-9]+).([0-9]+)((-[a-z]+).?([0-9]+))?$"
if [[ $prev_version =~ $regex ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
Expand Down Expand Up @@ -57,7 +57,7 @@ main() {
else ((++preversion))
fi
fi
pre="-alpha$preversion";;
pre="-alpha.$preversion";;
"beta")
if [[ -z "$preversion" ]];
then
Expand All @@ -69,7 +69,7 @@ main() {
else ((++preversion))
fi
fi
pre="-beta$preversion";;
pre="-beta.$preversion";;
"rc")
if [[ -z "$preversion" ]];
then
Expand All @@ -81,7 +81,7 @@ main() {
else ((++preversion))
fi
fi
pre="-rc$preversion";;
pre="-rc.$preversion";;
esac

next_version="${major}.${minor}.${patch}${pre}"
Expand Down

0 comments on commit dee875d

Please sign in to comment.