diff --git a/scripts/macOS/2_deploy.sh b/scripts/macOS/2_deploy.sh index 0ad081a2a..1426d0258 100755 --- a/scripts/macOS/2_deploy.sh +++ b/scripts/macOS/2_deploy.sh @@ -8,8 +8,8 @@ PACKAGES_PATH=$SCRIPTS_PATH/../../packages SIGN=false NOTARIZE=false CERT_ID="" -NOT_USER="" -NOT_PASSWORD="" +NOTAR_USER="" +NOTAR_PASSWORD="" #checking for parameters for i in "$@" @@ -28,17 +28,21 @@ case $i in shift # past argument=value ;; -ci=*|--cert_id=*) - SIGN=true CERT_ID="${i#*=}" + if [ -n "$CERT_ID" ]; then + SIGN=true + fi shift # past argument=value ;; -nu=*|--notarization_user=*) - NOTARIZE=true NOT_USER="${i#*=}" + if [ -n "$NOT_USER" ]; then + NOTARIZE=true + fi shift # past argument=value ;; -np=*|--notarization_password=*) - NOT_PASSWORD="${i#*=}" + NOTAR_PASSWORD="${i#*=}" shift # past argument=value ;; *) @@ -58,7 +62,7 @@ if [ "$SIGN" = true ] ; then fi if [ "$NOTARIZE" = true ] ; then - bash $SCRIPTS_PATH/internal/2c_notarize_appbundle.sh -i=$INSTALL_PATH -nu=$NOT_USER -np=$NOT_PASSWORD + bash $SCRIPTS_PATH/internal/2c_notarize_appbundle.sh -i=$INSTALL_PATH -nu=$NOT_USER -np=$NOTAR_PASSWORD echo "======= AppBundle Notarized =======" fi diff --git a/scripts/macOS/internal/2c_notarize_appbundle.sh b/scripts/macOS/internal/2c_notarize_appbundle.sh index 902122bab..9b2188eb4 100644 --- a/scripts/macOS/internal/2c_notarize_appbundle.sh +++ b/scripts/macOS/internal/2c_notarize_appbundle.sh @@ -3,8 +3,8 @@ SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/.. INSTALL_PATH=$SCRIPTS_PATH/../../install -NOT_USER="" -NOT_PASSWORD="" +NOTAR_USER="" +NOTAR_PASSWORD="" #checking for parameters for i in "$@" @@ -15,11 +15,11 @@ case $i in shift # past argument=value ;; -nu=*|--notarization_user=*) - NOT_USER="${i#*=}" + NOTAR_USER="${i#*=}" shift # past argument=value ;; -np=*|--notarization_password=*) - NOT_PASSWORD="${i#*=}" + NOTAR_PASSWORD="${i#*=}" shift # past argument=value ;; *) @@ -28,7 +28,7 @@ case $i in esac done -xcrun notarytool store-credentials "notarytool-profile" --apple-id "$NOT_USER" --password "$NOT_PASSWORD" +xcrun notarytool store-credentials "notarytool-profile" --apple-id "$NOTAR_USER" --password "$NOTAR_PASSWORD" ditto -c -k --keepParent "$INSTALL_PATH/meshlab.app" "$INSTALL_PATH/notarization.zip"