add automated screenshots, fastlane metadata, and appstream metainfo
Fixes #174, fixes #173, fixes #172
This commit is contained in:
parent
7fd4fbec0b
commit
c93004f060
1 changed files with 870 additions and 103 deletions
30
linux/nix/screenshots.sh
Normal file
30
linux/nix/screenshots.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# Regenerates the README, AppStream and Fastlane screenshots, from
|
||||
# integration_test/screenshots. Run it from the repo root.
|
||||
|
||||
work="$(mktemp -d)"
|
||||
# shellcheck disable=SC2329 # Run by the trap
|
||||
cleanup() { rm -rf "$work"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
GOCACHE="$(go env GOCACHE)"
|
||||
export GOCACHE
|
||||
|
||||
XDG_DATA_HOME="$work/data" XDG_CACHE_HOME="$work/cache" \
|
||||
dbus-run-session -- \
|
||||
flutter test integration_test/screenshots/screenshots_test.dart -d linux \
|
||||
--dart-define="SCREENSHOTS_DIR=$work/out" "$@"
|
||||
|
||||
for shot in "$work"/out/*.png; do
|
||||
pngquant --quality 65-95 --speed 1 --strip --force --ext .png "$shot"
|
||||
oxipng --quiet --opt 4 --strip safe "$shot"
|
||||
done
|
||||
|
||||
install -Dm644 "$work"/out/desktop-*.png -t assets/screenshots
|
||||
|
||||
phone=fastlane/metadata/android/en-US/images/phoneScreenshots
|
||||
install -Dm644 "$work/out/phone-chat-light.png" "$phone/1.png"
|
||||
install -Dm644 "$work/out/phone-chat-dark.png" "$phone/2.png"
|
||||
install -Dm644 "$work/out/phone-rooms-light.png" "$phone/3.png"
|
||||
install -Dm644 "$work/out/phone-rooms-dark.png" "$phone/4.png"
|
||||
Loading…
Reference in a new issue