Skip to content

Commit

Permalink
Fix missing dir check
Browse files Browse the repository at this point in the history
  • Loading branch information
tustanivsky committed Nov 13, 2024
1 parent 38c23b0 commit 5b1cd92
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/download-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ curl -L "${cocoaFrameworkUrl}" -o "${sentryCocoaCache}/Sentry-Dynamic.xcframewor
unzip -o "${sentryCocoaCache}/Sentry-Dynamic.xcframework.zip" -d "${sentryCocoaCache}/"

# Prepare iOS artifacts
rm -rf "$(dirname $sentryArtifactsDestination)/IOS/"*

if ! [ -d "$(dirname $sentryArtifactsDestination)/IOS" ]; then
mkdir "$(dirname $sentryArtifactsDestination)/IOS"
else
rm -rf "$(dirname $sentryArtifactsDestination)/IOS/"*
fi

cp -R "${sentryCocoaCache}/Sentry-Dynamic.xcframework/ios-arm64_arm64e/Sentry.framework" "$(dirname $sentryArtifactsDestination)/IOS/Sentry.framework"

Expand All @@ -36,7 +41,12 @@ rm -rf "Sentry.embeddedframework"
rm "Sentry.embeddedframework.zip"

# Prepare Mac artifacts
rm -rf "$(dirname $sentryArtifactsDestination)/Mac/"*

if ! [ -d "$(dirname $sentryArtifactsDestination)/Mac" ]; then
mkdir "$(dirname $sentryArtifactsDestination)/Mac"
else
rm -rf "$(dirname $sentryArtifactsDestination)/Mac/"*
fi

mkdir "$(dirname $sentryArtifactsDestination)/Mac/bin"
mkdir "$(dirname $sentryArtifactsDestination)/Mac/include"
Expand Down

0 comments on commit 5b1cd92

Please sign in to comment.