Guest User

Untitled

a guest
Feb 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Script configuration
  4.  
  5. devicesArray=(
  6. "iPhone 8"
  7. "iPhone 8 Plus"
  8. "iPhone 5s"
  9. "iPhone X")
  10.  
  11. workspace="FBSnapshotTestCaseExample"
  12.  
  13. scheme="FBSnapshotTestCaseExample"
  14.  
  15. # List devices to snapshot
  16.  
  17. echo "Devices to snapshot:"
  18. for index in ${!devicesArray[*]}
  19. do
  20. printf " %s\n" "${devicesArray[$index]}"
  21. done
  22.  
  23. # Create final command
  24.  
  25. finalCommand="xcodebuild test -workspace $workspace.xcworkspace -scheme $scheme"
  26.  
  27. for index in ${!devicesArray[*]}
  28. do
  29. finalCommand="$baseCommand -destination 'platform=iOS Simulator,name=${devicesArray[$index]}'"
  30. done
  31.  
  32.  
  33. # Execute command
  34.  
  35. eval $finalCommand
Add Comment
Please, Sign In to add comment