Skip to content

Commit ec72420

Browse files
authored
Fix for when firebase packages differently (#48)
1 parent 1ed722c commit ec72420

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.scripts/package.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,26 @@ if [[ $latest != $current || $debug ]]; then
370370
gh release download --pattern 'Firebase.zip' --repo $firebase_repo
371371
echo "Unzipping.."
372372
unzip -q Firebase.zip
373-
echo "Preparing xcframeworks for distribution..."
373+
# Sometimes Firebase packages frameworks in a folder named for the version
374+
if [ ! -d "Firebase" ]; then
375+
# Get version number with _ instead of .
376+
fixed_version=$(echo $latest | sed 's/\./_/g')
377+
378+
if [ -d "$fixed_version" ]; then
379+
cd $fixed_version
380+
# Find the first zip file in the current directory
381+
zip_file=$(ls -1 | grep .zip | head -1)
382+
echo "Unzipping $zip_file..."
383+
unzip -q $zip_file
384+
mv Firebase ../Firebase
385+
cd ..
386+
else
387+
echo "Could not find Firebase folder."
388+
exit 1
389+
fi
390+
fi
374391
cd Firebase
392+
echo "Preparing xcframeworks for distribution..."
375393
rename_frameworks "_"
376394
zip_frameworks
377395
echo "Creating distribution files..."

0 commit comments

Comments
 (0)