Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XCFramework pods after running bin/generate-podspecs.sh #5846

Merged
13 changes: 9 additions & 4 deletions bin/generate-podspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [[ $PROMPT_RESPONSE_2 != "y" ]]; then
exit 1
fi

mkdir $DEST
mkdir "$DEST"

NODE_MODULES_DIR="gutenberg/node_modules"

Expand Down Expand Up @@ -74,7 +74,7 @@ do

echo "Generating podspec for $pod"
pod ipc spec "$podspec" > "$DEST/$pod.podspec.json"

# react-native-blur doesn't have a tag field in it's podspec
if [[ "$pod" == "react-native-blur" ]]; then
echo " ==> Patching $pod podspec"
Expand All @@ -84,7 +84,7 @@ do
jq '.source.tag = "v3.6.1" | .version = "3.6.1"' "$DEST/$pod.podspec.json" > "$TMP_RNBlurPodspec"
mv "$TMP_RNBlurPodspec" "$DEST/$pod.podspec.json"
fi

# Add warning to bottom
TMP_SPEC=$(mktemp)
jq '. + {"__WARNING!__": "This file is autogenerated by generate-podspecs.sh script. Do not modify manually. Re-run the script if necessary."}' "$DEST/$pod.podspec.json" > "$TMP_SPEC"
Expand Down Expand Up @@ -195,4 +195,9 @@ do
jq --arg COMMIT_HASH "$COMMIT_HASH" 'del(.script_phases) | del(.prepare_command) | del(.source.tag) | .source.git = "https://github.com/wordpress-mobile/gutenberg-mobile.git" | .source.commit = $COMMIT_HASH | .source.submodules = "true" | .source_files = "third-party-podspecs/FBReactNativeSpec/**/*.{c,h,m,mm,cpp}"' "$DEST/FBReactNativeSpec/FBReactNativeSpec.podspec.json" > "$TMP_FBReactNativeSpec"
mv "$TMP_FBReactNativeSpec" "$DEST/FBReactNativeSpec/FBReactNativeSpec.podspec.json"
fi
done
done

echo 'Updating XCFramework Podfile.lock with these changes'
pushd ios-xcframework
bundle exec pod update
popd
dcalhoun marked this conversation as resolved.
Show resolved Hide resolved