Relax validation of -BETA / -RC releases
Accross the code, release names are checked against some variation of -BETAx / -RCx which are inconsistent in the range of accepted values for `x`. As a consequence, some commands cannot be successfuly run while they are valid, e.g. `bastille create test 14.0-RC4 10.0.0.2` is rejected because only `*-RC1` and `*-RC2` are accepted as a RC release name. Find out these lists of specific BETA and RC patterns and adjust them to allow any one-digit value at the end. We generaly do up to 4 BETA / RC releases, so a one digit limit is probably enough for the time being.
This commit is contained in:
@@ -489,9 +489,9 @@ case "${1}" in
|
||||
PLATFORM_OS="FreeBSD"
|
||||
validate_release_url
|
||||
;;
|
||||
*-RELEASE|*-release|*-RC1|*-rc1|*-RC2|*-rc2|*-RC3|*-rc3|*-RC4|*-rc4|*-RC5|*-rc5|*-BETA1|*-BETA2|*-BETA3|*-BETA4|*-BETA5)
|
||||
*-RELEASE|*-release|*-RC[1-9]|*-rc[1-9]|*-BETA[1-9])
|
||||
## check for FreeBSD releases name
|
||||
NAME_VERIFY=$(echo "${RELEASE}" | grep -iwE '^([1-9]{2,2})\.[0-9](-RELEASE|-RC[1-5]|-BETA[1-5])$' | tr '[:lower:]' '[:upper:]')
|
||||
NAME_VERIFY=$(echo "${RELEASE}" | grep -iwE '^([1-9]{2,2})\.[0-9](-RELEASE|-RC[1-9]|-BETA[1-9])$' | tr '[:lower:]' '[:upper:]')
|
||||
UPSTREAM_URL="${bastille_url_freebsd}${HW_MACHINE}/${HW_MACHINE_ARCH}/${NAME_VERIFY}"
|
||||
PLATFORM_OS="FreeBSD"
|
||||
validate_release_url
|
||||
|
||||
Reference in New Issue
Block a user