Skip to content

Commit

Permalink
Validate input season in deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
platfowner committed Sep 10, 2024
1 parent 6c821c0 commit facf3f6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
7 changes: 6 additions & 1 deletion start_node_genesis_gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ function parse_options() {
}

# Parse options.
SEASON="$1"
if [[ "$1" = 'dev' ]] || [[ "$1" = 'staging' ]] || [[ "$1" = 'sandbox' ]] || [[ "$1" = 'exp' ]] || [[ "$1" = 'spring' ]] || [[ "$1" = 'summer' ]] || [[ "$1" = 'mainnet' ]]; then
SEASON="$1"
else
printf "Invalid project/season argument: $1\n"
exit
fi
GCP_USER="$2"

number_re='^[0-9]+$'
Expand Down
7 changes: 6 additions & 1 deletion start_node_genesis_onprem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ function parse_options() {
}

# Parse options.
SEASON="$1"
if [[ "$1" = 'staging' ]] || [[ "$1" = 'spring' ]] || [[ "$1" = 'mainnet' ]]; then
SEASON="$1"
else
printf "Invalid project/season argument: $1\n"
exit
fi
ONPREM_USER="$2"

number_re='^[0-9]+$'
Expand Down
7 changes: 6 additions & 1 deletion start_node_incremental_gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ function parse_options() {
}

# Parse options.
SEASON="$1"
if [[ "$1" = 'dev' ]] || [[ "$1" = 'staging' ]] || [[ "$1" = 'sandbox' ]] || [[ "$1" = 'exp' ]] || [[ "$1" = 'spring' ]] || [[ "$1" = 'summer' ]] || [[ "$1" = 'mainnet' ]]; then
SEASON="$1"
else
printf "Invalid project/season argument: $1\n"
exit
fi
GCP_USER="$2"

number_re='^[0-9]+$'
Expand Down
7 changes: 6 additions & 1 deletion start_node_incremental_onprem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ function parse_options() {
}

# Parse options.
SEASON="$1"
if [[ "$1" = 'staging' ]] || [[ "$1" = 'spring' ]] || [[ "$1" = 'mainnet' ]]; then
SEASON="$1"
else
printf "Invalid project/season argument: $1\n"
exit
fi
ONPREM_USER="$2"

number_re='^[0-9]+$'
Expand Down

0 comments on commit facf3f6

Please sign in to comment.