mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-22 05:42:33 +03:00
check platform in script
This commit is contained in:
parent
c60c69dbf0
commit
08a9fc5138
@ -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)
|
||||
#check if platform to be built for is android
|
||||
if [ "$PLATFORM" == "Android" ]; then
|
||||
|
||||
# Remove 'pod install' from the current postinstall script
|
||||
updated_package_json=$(echo "$package_json" | sed 's/ && cd ios && pod install//g')
|
||||
echo "Android platform detected"
|
||||
# Read package.json into a variable
|
||||
package_json=$(<package.json)
|
||||
|
||||
# Update package.json with the modified postinstall script
|
||||
echo "$updated_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
|
Loading…
Reference in New Issue
Block a user