Skip to content

Instantly share code, notes, and snippets.

@sarunw
Created August 22, 2019 05:20
Show Gist options
  • Save sarunw/ac43a559680601276102426b8b12cc77 to your computer and use it in GitHub Desktop.
Save sarunw/ac43a559680601276102426b8b12cc77 to your computer and use it in GitHub Desktop.
Xcode script for support multiple env Google service.
echo "copy from GoogleService-Info-$CONFIGURATION.plist to $SRCROOT/[PROJECT_NAME]/GoogleService-Info.plist"
cp "$SRCROOT/[PROJECT_NAME]/GoogleService-Info-$CONFIGURATION.plist" "$SRCROOT/[PROJECT_NAME]/GoogleService-Info.plist"
echo "Clean up"
find "$SRCROOT/[PROJECT_NAME]/container/" -not -path '*/\.*' -type f -maxdepth 1 -delete
if [ "${CONFIGURATION}" = "Debug" ] || [ "${CONFIGURATION}" = "Release" ]; then
echo "copy from $SRCROOT/[PROJECT_NAME]/container/Release/ to $SRCROOT/[PROJECT_NAME]/container/"
cp -r "$SRCROOT/[PROJECT_NAME]/container/Release/" "$SRCROOT/[PROJECT_NAME]/container/"
fi
if [ "${CONFIGURATION}" = "Staging" ] || [ "${CONFIGURATION}" = "DebugStaging" ]; then
echo "copy from $SRCROOT/[PROJECT_NAME]/container/Staging/ to $SRCROOT/[PROJECT_NAME]/container/"
cp -r "$SRCROOT/[PROJECT_NAME]/container/Staging/" "$SRCROOT/[PROJECT_NAME]/container/"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment