2019-12-26 19:17:31 +01:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
madelinePath=$PWD
|
|
|
|
|
2019-12-26 19:47:24 +01:00
|
|
|
tempDir=/tmp/tempConv$1
|
|
|
|
|
|
|
|
rm -rf $tempDir
|
|
|
|
mkdir $tempDir
|
|
|
|
cd $tempDir
|
|
|
|
|
|
|
|
pwd
|
2019-12-26 19:17:31 +01:00
|
|
|
|
|
|
|
echo '{
|
|
|
|
"name": "danog/madelineprototests",
|
|
|
|
"minimum-stability":"dev",
|
|
|
|
"require": {
|
|
|
|
"danog/madelineproto": "dev-master",
|
|
|
|
"amphp/dns": "dev-master#ecbeca2ae0e93c08e8150a92810a3961fad8ecbe as v1"
|
|
|
|
},
|
|
|
|
"require-dev": {
|
|
|
|
"vlucas/phpdotenv": "^3"
|
|
|
|
},
|
|
|
|
"repositories": [
|
|
|
|
{
|
|
|
|
"type": "path",
|
|
|
|
"url": "'$madelinePath'",
|
|
|
|
"options": {
|
|
|
|
"symlink": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"authors": [
|
|
|
|
{
|
|
|
|
"name": "Daniil Gentili",
|
|
|
|
"email": "daniil@daniil.it"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}' > composer.json
|
|
|
|
composer update
|
|
|
|
|
2019-12-26 19:47:24 +01:00
|
|
|
$madelinePath/tests/conversion/prepare-$1.sh
|
2019-12-26 19:17:31 +01:00
|
|
|
|
|
|
|
$madelinePath/vendor/bin/php7to$1 convert --copy-all vendor newVendor
|
|
|
|
rm -rf vendor
|
|
|
|
mv newVendor vendor
|
|
|
|
|
2019-12-26 19:47:24 +01:00
|
|
|
$madelinePath/tests/conversion/after-$1.sh
|
2019-12-26 19:17:31 +01:00
|
|
|
|
|
|
|
composer dumpautoload --optimize
|
|
|
|
|
|
|
|
cd $madelinePath
|
|
|
|
if [ $1 -eq 5 ];then
|
2019-12-26 19:47:24 +01:00
|
|
|
php5.6 tests/testing.php $1
|
2019-12-26 19:17:31 +01:00
|
|
|
else
|
2019-12-26 19:47:24 +01:00
|
|
|
php7.0 tests/testing.php $1
|
2019-12-26 19:17:31 +01:00
|
|
|
fi
|