php: cleanup translators

This commit is contained in:
Martin Toman 2022-09-19 14:25:37 -07:00
parent 056ef41742
commit 7a2ff69fb3
2 changed files with 6 additions and 7 deletions

View File

@ -56,15 +56,12 @@
# create lockfile
if [ "$(jq '.project.subsystemInfo.noDev' -c -r $jsonInput)" == "true" ]; then
echo "excluding dev dependencies"
jq '.require-dev = {}' ./composer.json > composer.json.mod
mv composer.json.mod composer.json
composer update --ignore-platform-reqs --no-scripts --no-plugins --no-install --no-dev
else
composer update --ignore-platform-reqs --no-scripts --no-plugins --no-install
mv composer.json composer.json.orig
jq '.require-dev = {}' ./composer.json.orig > composer.json
fi
composer update --ignore-platform-reqs --no-scripts --no-plugins --no-install
jq ".source = \"$newSource\"" -c -r $jsonInput > $TMPDIR/newJsonInput
popd
${subsystems.php.translators.composer-lock.translateBin} $TMPDIR/newJsonInput
'';

View File

@ -68,10 +68,12 @@
popd
if [ -e $TMPDIR/source/composer.lock ]
if [ -f $TMPDIR/source/composer.lock ]
then
echo 'Translating with composer-lock'
${subsystems.php.translators.composer-lock.translateBin} $TMPDIR/newJsonInput
else
echo 'Translating with composer-json'
${subsystems.php.translators.composer-json.translateBin} $TMPDIR/newJsonInput
fi