Skip to content

Commit

Permalink
Merge pull request #5901 from wordpress-mobile/build/repair-xcframewo…
Browse files Browse the repository at this point in the history
…rk-integration

build: Fix generate-podspecs script errors
  • Loading branch information
dcalhoun authored Jun 26, 2023
2 parents 3a28820 + 1eccc74 commit 99e37bd
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions bin/generate-podspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function warn_missing_tag_commit() {
}

# Change to the expected directory.
cd "$( dirname "$0" )"
cd ..
pushd "$( dirname "$0" )" > /dev/null
popd > /dev/null
WD=$(pwd)
echo "Working directory: $WD"

Expand Down Expand Up @@ -96,7 +96,7 @@ done

# Generate the React Native podspecs
# Change to the React Native directory to get relative paths for the RN podspecs
cd "$NODE_MODULES_DIR/react-native"
pushd "$NODE_MODULES_DIR/react-native" > /dev/null

RN_DIR="./"
SCRIPTS_PATH="./scripts/"
Expand Down Expand Up @@ -196,8 +196,13 @@ do
mv "$TMP_FBReactNativeSpec" "$DEST/FBReactNativeSpec/FBReactNativeSpec.podspec.json"
fi
done

echo 'Updating XCFramework Podfile.lock with these changes'
pushd ios-xcframework
bundle exec pod update
popd
popd > /dev/null

# We are required to run this script twice to capture the correct target.
# 0 is the value set during the first script run to generate the podspecs.
if [[ "$COMMIT_HASH" != "0" ]]; then
echo 'Updating XCFramework Podfile.lock with these changes'
pushd ios-xcframework > /dev/null
bundle exec pod update
popd > /dev/null
fi

0 comments on commit 99e37bd

Please sign in to comment.