mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
refactor(scripts): rework how Maestro flows are run
This commit is contained in:
parent
24898cf9fb
commit
6e291a8df1
4 changed files with 21 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p imagemagick libwebp
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
@ -7,13 +9,13 @@ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
|
|||
SCREENSHOT_DIR="${SCRIPT_DIR}"/../screenshots
|
||||
|
||||
# Run the Maestro flow to generate the screenshots
|
||||
source "${SCRIPT_DIR}"/run-maestro-flows.sh
|
||||
"${SCRIPT_DIR}"/run-maestro-flows.sh feature_graphic.yml
|
||||
|
||||
# Use imagemagick to stitch the screenshots horizontally
|
||||
nix-shell -p imagemagick --run "convert +append ${SCREENSHOT_DIR}/HottestPosts.png ${SCREENSHOT_DIR}/CommentsPage.png ${SCREENSHOT_DIR}/SavedPosts.png ${SCRIPT_DIR}/../.github/readme_feature.png"
|
||||
convert +append "${SCREENSHOT_DIR}"/HottestPosts.png "${SCREENSHOT_DIR}"/CommentsPage.png "${SCREENSHOT_DIR}"/SavedPosts.png "${SCRIPT_DIR}"/../.github/readme_feature.png
|
||||
|
||||
# Convert the resulting PNG to WebP
|
||||
nix-shell -p libwebp --run "cwebp .github/readme_feature.png -o .github/readme_feature.webp"
|
||||
cwebp .github/readme_feature.png -o .github/readme_feature.webp
|
||||
|
||||
# Remove the now-useless PNG
|
||||
rm ".github/readme_feature.png"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue