mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2024-12-26 03:12:37 +00:00
76a570b7b3
Add TV screenshots and organize PassepartoutUITests with two test plans for generating iOS/macOS (Main) and tvOS (TV) screenshots. Revert to the .attachment destination and use `xcparse` to export the screenshots. Change iPad screenshots to portrait. Then autogenerate framed screenshots in two steps: - Export the UITests screenshots per device (`export.sh`) - Embed the results in a HTML/CSS template and take snapshots with Chrome headless (`compose.sh`) - Repeat for all devices (iPhone, iPad, Mac and Apple TV) - Save framed screenshots to the `fastlane` screenshots directory
50 lines
797 B
Bash
Executable File
50 lines
797 B
Bash
Executable File
#!/bin/bash
|
|
cwd=`dirname $0`
|
|
device=$1
|
|
compose_cmd="$cwd/compose.sh"
|
|
fastlane_screenshots_root="$cwd/../fastlane/screenshots"
|
|
|
|
case $device in
|
|
|
|
"iphone")
|
|
nums=("01 02 03 04 05")
|
|
template="main"
|
|
width=1242
|
|
height=2688
|
|
fastlane="iOS"
|
|
;;
|
|
|
|
"ipad")
|
|
nums=("01 02 03 04 05")
|
|
template="main"
|
|
width=2048
|
|
height=2732
|
|
fastlane="iOS"
|
|
;;
|
|
|
|
"mac")
|
|
nums=("01 02 03 04 05")
|
|
template="main"
|
|
width=2880
|
|
height=1800
|
|
fastlane="macOS"
|
|
;;
|
|
|
|
"appletv")
|
|
nums=("01 02 03")
|
|
template="tv"
|
|
width=3840
|
|
height=2160
|
|
fastlane="tvOS"
|
|
;;
|
|
|
|
*)
|
|
echo "Unknown device: $device"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
for num in $nums; do
|
|
$compose_cmd $template $device $num $width $height "$fastlane_screenshots_root/$fastlane/en-US"
|
|
done
|