mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-22 05:42:33 +03:00
removing pod install from postinstall, running platform specific build commands
This commit is contained in:
parent
08a9fc5138
commit
1aec9225e5
@ -20,19 +20,13 @@ printf "end of post-clone.sh\n"
|
|||||||
echo "Selected Platform to buit"
|
echo "Selected Platform to buit"
|
||||||
echo "$PLATFORM"
|
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
|
# Read package.json into a variable
|
||||||
package_json=$(<package.json)
|
package_json=$(<package.json)
|
||||||
|
|
||||||
# Remove 'pod install' from the current postinstall script
|
# Remove 'pod install' from the current postinstall script
|
||||||
updated_package_json=$(echo "$package_json" | sed 's/ && cd ios && pod install//g')
|
updated_package_json=$(echo "$package_json" | sed 's/ && cd ios && pod install//g')
|
||||||
|
|
||||||
# Update package.json with the modified postinstall script
|
# Update package.json with the modified postinstall script
|
||||||
echo "$updated_package_json" > package.json
|
echo "$updated_package_json" > package.json
|
||||||
|
|
||||||
elif [ "$PLATFORM" == "iOS" ]; then
|
|
||||||
echo "Building for iOS"
|
|
||||||
fi
|
|
||||||
|
@ -62,7 +62,17 @@ printf "\n.env created with contents:\n"
|
|||||||
cat .env
|
cat .env
|
||||||
printf "\nEND OF .env\n"
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cd android && ./gradlew clean && cd ..
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user