#!/usr/bin/env php Usage: php rollback-firmware.php [options] Options: --stage STAGE Stage to rollback (dev, staging, prod) --device DEVICE Device to rollback (rm-e32-r6-b6, esp32-s3-poe-eth-8di-8ro-c) --steps N Number of versions to rollback (default: 1) --dry-run Show what would be rolled back without changes --all-stages Rollback all stages for specified device --all-devices Rollback all devices for specified stage --help Show this help message Examples: php rollback-firmware.php --stage prod --device rm-e32-r6-b6 --steps 1 php rollback-firmware.php --all-stages --device rm-e32-r6-b6 --dry-run php rollback-firmware.php --stage prod --all-devices --steps 2 WARNING: This operation removes firmware files. Use --dry-run first!