Skip to content

Commit

Permalink
comment validate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgopack4 committed Jul 18, 2024
1 parent 0214867 commit b5ab417
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
- name: Validate version format
run: |
validate_beta_version() {
local regex_pattern_beta='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ! "$1" =~ $regex_pattern_beta ]]; then
echo "Invalid $2 version format. For beta, it can be 0.1.0 or higher"
exit 1
fi
# local regex_pattern_beta='^[0-9]+\.[0-9]+\.[0-9]+$'
# if [[ ! "$1" =~ $regex_pattern_beta ]]; then
# echo "Invalid $2 version format. For beta, it can be 0.1.0 or higher"
# exit 1
# fi
}
validate_stable_version() {
local regex_pattern_stable='^[1-9][0-9]*\.[0-9]+\.[0-9]+$'
if [[ ! "$1" =~ $regex_pattern_stable ]]; then
echo "Invalid stable version format for $2. Major version must be greater than 1."
exit 1
fi
# local regex_pattern_stable='^[1-9][0-9]*\.[0-9]+\.[0-9]+$'
# if [[ ! "$1" =~ $regex_pattern_stable ]]; then
# echo "Invalid stable version format for $2. Major version must be greater than 1."
# exit 1
# fi
}
validate_beta_version "${{ inputs.candidate-beta }}" "candidate-beta"
Expand Down

0 comments on commit b5ab417

Please sign in to comment.