Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/release/scripts/prep-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ enforce_latest_code() {
fi
}

# Function to validate the version number format x.y.z(-beta.w)
# Function to validate the version number format x.y.z(bw)
update_and_validate_version() {
while true; do
# Prompt the user to input the version number
read -p "Enter the version number (format: x.y.z(-beta.w)): " version
read -p "Enter the version number (format: x.y.z(bw)): " version

# Validate the version number format
if [[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?$ ]]; then
if [[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(b[0-9]+)?$ ]]; then
if [[ "${current_version}" != "${version}" ]]; then
# TODO: Check the less than case as well.
echo "New version number is: ${version}"
Expand All @@ -49,7 +49,7 @@ update_and_validate_version() {
fi
else
echo "Invalid version number format: ${version}"
echo "Please enter a version number in the 'x.y.z(-beta.w)' format."
echo "Please enter a version number in the 'x.y.z(bw)' format."
fi
done
}
Expand Down
Loading