build-phar.sh 366 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -euf -o pipefail
  3. ./download-box.sh
  4. function restorePlatform {
  5. composer config --unset platform
  6. mv -f composer.lock.back composer.lock || true
  7. }
  8. # lock PHP to minimum allowed version
  9. composer config platform.php 7.2.0
  10. cp composer.lock composer.lock.back || true
  11. composer update
  12. php box.phar compile -vv
  13. trap restorePlatform exit