Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: linting
  • Loading branch information
UlisesGascon committed Jul 8, 2023
commit 43446db60e6dd09d0df48f0d9e8ca6b1ea0fd6a7
14 changes: 7 additions & 7 deletions tools/osx-notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ set -e
xcode_version=$(xcodebuild -version | awk '/Xcode/ {print $2}')
pkgid="$1"

[ -z "$pkgid" ] && {
if [ -z "$pkgid" ]; then
echo "Usage: $0 <pkgid>"
exit 1
}
fi

# shellcheck disable=SC2154
[ -z "$NOTARIZATION_ID" ] && {
if [ -z "$NOTARIZATION_ID" ]; then
echo "No NOTARIZATION_ID environment variable. Skipping notarization."
exit 0
}
fi

if [[ "$xcode_version" < "13.0" ]]; then
if [ "$(echo "$xcode_version < 13.0" | bc)" -eq 1 ]; then
echo "Notarization process is done with gon."
set -x

Expand All @@ -41,7 +41,7 @@ if [[ "$xcode_version" < "13.0" ]]; then
else
echo "Notarization process is done with Notarytool."

if ! command -v xcrun &> /dev/null || ! xcrun --find notarytool &> /dev/null; then
if ! command -v xcrun >/dev/null || ! xcrun --find notarytool >/dev/null; then
echo "Notarytool is not present in the system. Notarization has failed."
exit 1
fi
Expand All @@ -64,4 +64,4 @@ else
echo "Notarization failed. Error: $notarization_output"
exit 1
fi
fi
fi