Skip to content

Commit

Permalink
Update CheckInputs.sh
Browse files Browse the repository at this point in the history
Script modified for allowing 3 digits instead of 2
  • Loading branch information
vikingvela authored Jun 11, 2024
1 parent 3f9e008 commit ee6d1c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scripts/CheckInputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
# Check NAME
case $TYPE in
"validator")
if [[ ! $NAME =~ ^VAL_[a-zA-Z0-9_-]+_B_[0-9][0-9]?_[0-9][0-9]?_[0-9][0-9]?$ ]]; then
if [[ ! $NAME =~ ^VAL_[a-zA-Z0-9_-]+_B_[0-9]{1,3}_[0-9]{1,3}_[0-9]{1,3}$ ]]; then
echo "ERROR: invalid input 'name'"
echo "ERROR: node name $NAME of type $TYPE doesn't match expression ^VAL_[a-zA-Z0-9_-]+_B_[0-9][0-9]?_[0-9][0-9]?_[0-9][0-9]?$"
exit 1
Expand All @@ -22,7 +22,7 @@ case $TYPE in
fi
;;
"regular")
if [[ ! $NAME =~ ^REG_[a-zA-Z0-9_-]+_B_[0-9][0-9]?_[0-9][0-9]?_[0-9][0-9]?$ ]]; then
if [[ ! $NAME =~ ^REG_[a-zA-Z0-9_-]+_B_[0-9]{1,3}_[0-9]{1,3}_[0-9]{1,3}$ ]]; then
echo "ERROR: invalid input 'name'"
echo "ERROR: node name $NAME of type $TYPE doesn't match expression ^REG_[a-zA-Z0-9_-]+_B_[0-9][0-9]?_[0-9][0-9]?_[0-9][0-9]?$"
exit 1
Expand Down

0 comments on commit ee6d1c9

Please sign in to comment.