Skip to content

Commit

Permalink
Fix for when firebase packages differently (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
evandcoleman authored Sep 30, 2024
1 parent 1ed722c commit ec72420
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,26 @@ if [[ $latest != $current || $debug ]]; then
gh release download --pattern 'Firebase.zip' --repo $firebase_repo
echo "Unzipping.."
unzip -q Firebase.zip
echo "Preparing xcframeworks for distribution..."
# Sometimes Firebase packages frameworks in a folder named for the version
if [ ! -d "Firebase" ]; then
# Get version number with _ instead of .
fixed_version=$(echo $latest | sed 's/\./_/g')

if [ -d "$fixed_version" ]; then
cd $fixed_version
# Find the first zip file in the current directory
zip_file=$(ls -1 | grep .zip | head -1)
echo "Unzipping $zip_file..."
unzip -q $zip_file
mv Firebase ../Firebase
cd ..
else
echo "Could not find Firebase folder."
exit 1
fi
fi
cd Firebase
echo "Preparing xcframeworks for distribution..."
rename_frameworks "_"
zip_frameworks
echo "Creating distribution files..."
Expand Down

0 comments on commit ec72420

Please sign in to comment.