removing pod install from postinstall, running platform specific build commands

This commit is contained in:
noumantahir 2024-03-07 19:42:19 +05:00
parent 08a9fc5138
commit 1aec9225e5
2 changed files with 19 additions and 15 deletions

View File

@ -20,10 +20,8 @@ printf "end of post-clone.sh\n"
echo "Selected Platform to buit"
echo "$PLATFORM"
#check if platform to be built for is android
if [ "$PLATFORM" == "Android" ]; then
echo "Android platform detected"
echo "Removing postinstall pod install command"
# Read package.json into a variable
package_json=$(<package.json)
@ -32,7 +30,3 @@ if [ "$PLATFORM" == "Android" ]; then
# Update package.json with the modified postinstall script
echo "$updated_package_json" > package.json
elif [ "$PLATFORM" == "iOS" ]; then
echo "Building for iOS"
fi

View File

@ -62,7 +62,17 @@ printf "\n.env created with contents:\n"
cat .env
printf "\nEND OF .env\n"
cd ios && pod install && cd ..
#check if platform to be built for is android
if [ "$PLATFORM" == "Android" ]; then
echo "Building for Android"
cd android && ./gradlew clean && cd ..
elif [ "$PLATFORM" == "iOS" ]; then
echo "Building for iOS"
cd ios && pod install && cd ..
fi