From 08a9fc5138100b3530ccb948333363123cb191ec Mon Sep 17 00:00:00 2001 From: noumantahir Date: Thu, 7 Mar 2024 19:38:09 +0500 Subject: [PATCH] check platform in script --- appcenter-post-clone.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/appcenter-post-clone.sh b/appcenter-post-clone.sh index 012f93437..0542292f9 100644 --- a/appcenter-post-clone.sh +++ b/appcenter-post-clone.sh @@ -17,12 +17,22 @@ node -v printf "end of post-clone.sh\n" +echo "Selected Platform to buit" +echo "$PLATFORM" -# Read package.json into a variable -package_json=$( package.json + # Remove 'pod install' from the current postinstall script + updated_package_json=$(echo "$package_json" | sed 's/ && cd ios && pod install//g') + + # Update package.json with the modified postinstall script + echo "$updated_package_json" > package.json + +elif [ "$PLATFORM" == "iOS" ]; then + echo "Building for iOS" +fi \ No newline at end of file