File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -81,16 +81,20 @@ jobs:
8181 file_minor=$(echo "$file_release_version" | cut -d'.' -f2)
8282 file_patch=$(echo "$file_release_version" | cut -d'.' -f3)
8383
84+ # decrement the patch version by 1 to get the latest stable release version
85+ stable_patch=$((file_patch - 1))
86+ echo "Stable release version: $file_major.$file_minor.$stable_patch"
87+
8488 input_major=$(echo "$input_release_version" | cut -d'.' -f1)
8589 input_minor=$(echo "$input_release_version" | cut -d'.' -f2)
8690 input_patch=$(echo "$input_release_version" | cut -d'.' -f3)
8791
8892 if [ "$input_major" -eq "$file_major" ]; then
8993 if [ "$input_minor" -eq "$file_minor" ]; then
90- if [ "$input_patch" -ge "$file_patch " ]; then
94+ if [ "$input_patch" -gt "$stable_patch " ]; then
9195 echo "Valid patch version input"
9296 else
93- echo "Error: Patch version cannot be less than or equal to the current version."
97+ echo "Error: Patch version cannot be less than or equal to the stable release version."
9498 exit 1
9599 fi
96100 elif [ "$input_minor" -gt "$file_minor" ] && [ "$input_patch" -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments