Skip to content

Commit

Permalink
Hoist functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Jul 14, 2024
1 parent 119eb71 commit 421e986
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions build/apple_release/scripts/darwin-sign-and-notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@

set -e

check_path_exists() {
local path=$1
local error_message=$2

if [ ! -f "$path" ]; then
echo "$error_message"
exit 1
fi
}

check_environment_variable() {
local variable=$1
local variable_name=$2
local error_message=$3
if [ -z "$variable" ]; then
echo "Missing: $variable_name, Error: $error_message"
exit 1
fi
}

# Validates the structure of the app template directory.
validate_app_template_structure() {
check_path_exists "$APP_TEMPLATE_PATH" "Error: $APP_TEMPLATE_PATH directory does not exist."
Expand All @@ -38,26 +58,6 @@ validate_inputs() {
validate_app_template_structure
}

check_path_exists() {
local path=$1
local error_message=$2

if [ ! -f "$path" ]; then
echo "$error_message"
exit 1
fi
}

check_environment_variable() {
local variable=$1
local variable_name=$2
local error_message=$3
if [ -z "$variable" ]; then
echo "Missing: $variable_name, Error: $error_message"
exit 1
fi
}


prepare_keychain_and_certificate() {
local temp_dir
Expand Down

0 comments on commit 421e986

Please sign in to comment.