mirror of
https://github.com/doctrine/migrations.git
synced 2026-03-23 22:42:14 +01:00
The trap function was registered as the last bash instruction and as a result was not executed if anything failed before, e.g. the composer update command or building the PHAR itself. In the event the build PHAR script fails, the temporary backup composer.lock file may be created and not removed.
20 lines
366 B
Bash
Executable File
20 lines
366 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euf -o pipefail
|
|
|
|
./download-box.sh
|
|
|
|
function restorePlatform {
|
|
composer config --unset platform
|
|
mv -f composer.lock.back composer.lock || true
|
|
}
|
|
|
|
trap restorePlatform exit
|
|
|
|
# lock PHP to minimum allowed version
|
|
composer config platform.php 7.2.0
|
|
cp composer.lock composer.lock.back || true
|
|
composer update
|
|
|
|
php box.phar compile -vv
|