diff options
author | Michal Čihař <michal@cihar.com> | 2018-01-16 14:09:02 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2018-01-16 14:09:02 +0300 |
commit | 22c54590bead98f71a844893cdee78ab116330c0 (patch) | |
tree | 09d8a65171d6742a092a2e9f2c2eca2bb5c3ea78 /scripts | |
parent | f45d4a566beb58f19d3754651d863c3e1e769b86 (diff) | |
parent | fb92eca5eeb8c89f6b6c5196f7bce49bc51aeca7 (diff) |
Merge branch 'QA_4_7'
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-release.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/create-release.sh b/scripts/create-release.sh index 79b31457fa..eb7a5be676 100755 --- a/scripts/create-release.sh +++ b/scripts/create-release.sh @@ -222,12 +222,18 @@ rm -f .travis.yml .coveralls.yml .scrutinizer.yml .jshintrc .weblate codecov.yml rm -f README.rst if [ ! -d libraries/tcpdf ] ; then - echo "* Running composer" - composer update --no-dev + PHP_REQ=`sed -n '/"php"/ s/.*">=\([0-9]\.[0-9]\).*/\1/p' composer.json` + if [ -z "$PHP_REQ" ] ; then + echo "Failed to figure out required PHP version from composer.json" + exit 2 + fi # Okay, there is no way to tell composer to install # suggested package. Let's require it and then revert # composer.json to original state. cp composer.json composer.json.backup + echo "* Running composer" + composer config platform.php "$PHP_REQ" + composer update --no-dev composer require --update-no-dev tecnickcom/tcpdf pragmarx/google2fa bacon/bacon-qr-code samyoul/u2f-php-server mv composer.json.backup composer.json echo "* Cleanup of composer packages" |